repo stringlengths 7 55 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1 value | code stringlengths 75 104k | code_tokens listlengths 19 28.4k | docstring stringlengths 1 46.9k | docstring_tokens listlengths 1 1.97k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|---|---|---|
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readFd | def readFd(fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. NOTE
that the file descriptor will not be closed when the reader
is closed or reset. """
ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
if ret is None:raise treeError('xmlReadFd() failed')
return xmlDoc(_obj=ret) | python | def readFd(fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. NOTE
that the file descriptor will not be closed when the reader
is closed or reset. """
ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
if ret is None:raise treeError('xmlReadFd() failed')
return xmlDoc(_obj=ret) | [
"def",
"readFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReadFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReadFd() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML from a file descriptor and build a tree. NOTE
that the file descriptor will not be closed when the reader
is closed or reset. | [
"parse",
"an",
"XML",
"from",
"a",
"file",
"descriptor",
"and",
"build",
"a",
"tree",
".",
"NOTE",
"that",
"the",
"file",
"descriptor",
"will",
"not",
"be",
"closed",
"when",
"the",
"reader",
"is",
"closed",
"or",
"reset",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1362-L1368 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readFile | def readFile(filename, encoding, options):
"""parse an XML file from the filesystem or the network. """
ret = libxml2mod.xmlReadFile(filename, encoding, options)
if ret is None:raise treeError('xmlReadFile() failed')
return xmlDoc(_obj=ret) | python | def readFile(filename, encoding, options):
"""parse an XML file from the filesystem or the network. """
ret = libxml2mod.xmlReadFile(filename, encoding, options)
if ret is None:raise treeError('xmlReadFile() failed')
return xmlDoc(_obj=ret) | [
"def",
"readFile",
"(",
"filename",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReadFile",
"(",
"filename",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReadFile() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML file from the filesystem or the network. | [
"parse",
"an",
"XML",
"file",
"from",
"the",
"filesystem",
"or",
"the",
"network",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1370-L1374 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readMemory | def readMemory(buffer, size, URL, encoding, options):
"""parse an XML in-memory document and build a tree. """
ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
if ret is None:raise treeError('xmlReadMemory() failed')
return xmlDoc(_obj=ret) | python | def readMemory(buffer, size, URL, encoding, options):
"""parse an XML in-memory document and build a tree. """
ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
if ret is None:raise treeError('xmlReadMemory() failed')
return xmlDoc(_obj=ret) | [
"def",
"readMemory",
"(",
"buffer",
",",
"size",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReadMemory",
"(",
"buffer",
",",
"size",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReadMemory() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML in-memory document and build a tree. | [
"parse",
"an",
"XML",
"in",
"-",
"memory",
"document",
"and",
"build",
"a",
"tree",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1376-L1380 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | recoverDoc | def recoverDoc(cur):
"""parse an XML in-memory document and build a tree. In the
case the document is not Well Formed, a attempt to build a
tree is tried anyway """
ret = libxml2mod.xmlRecoverDoc(cur)
if ret is None:raise treeError('xmlRecoverDoc() failed')
return xmlDoc(_obj=ret) | python | def recoverDoc(cur):
"""parse an XML in-memory document and build a tree. In the
case the document is not Well Formed, a attempt to build a
tree is tried anyway """
ret = libxml2mod.xmlRecoverDoc(cur)
if ret is None:raise treeError('xmlRecoverDoc() failed')
return xmlDoc(_obj=ret) | [
"def",
"recoverDoc",
"(",
"cur",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRecoverDoc",
"(",
"cur",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRecoverDoc() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML in-memory document and build a tree. In the
case the document is not Well Formed, a attempt to build a
tree is tried anyway | [
"parse",
"an",
"XML",
"in",
"-",
"memory",
"document",
"and",
"build",
"a",
"tree",
".",
"In",
"the",
"case",
"the",
"document",
"is",
"not",
"Well",
"Formed",
"a",
"attempt",
"to",
"build",
"a",
"tree",
"is",
"tried",
"anyway"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1382-L1388 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | recoverFile | def recoverFile(filename):
"""parse an XML file and build a tree. Automatic support for
ZLIB/Compress compressed document is provided by default if
found at compile-time. In the case the document is not Well
Formed, it attempts to build a tree anyway """
ret = libxml2mod.xmlRecoverFile(filename)
if ret is None:raise treeError('xmlRecoverFile() failed')
return xmlDoc(_obj=ret) | python | def recoverFile(filename):
"""parse an XML file and build a tree. Automatic support for
ZLIB/Compress compressed document is provided by default if
found at compile-time. In the case the document is not Well
Formed, it attempts to build a tree anyway """
ret = libxml2mod.xmlRecoverFile(filename)
if ret is None:raise treeError('xmlRecoverFile() failed')
return xmlDoc(_obj=ret) | [
"def",
"recoverFile",
"(",
"filename",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRecoverFile",
"(",
"filename",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRecoverFile() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML file and build a tree. Automatic support for
ZLIB/Compress compressed document is provided by default if
found at compile-time. In the case the document is not Well
Formed, it attempts to build a tree anyway | [
"parse",
"an",
"XML",
"file",
"and",
"build",
"a",
"tree",
".",
"Automatic",
"support",
"for",
"ZLIB",
"/",
"Compress",
"compressed",
"document",
"is",
"provided",
"by",
"default",
"if",
"found",
"at",
"compile",
"-",
"time",
".",
"In",
"the",
"case",
"the",
"document",
"is",
"not",
"Well",
"Formed",
"it",
"attempts",
"to",
"build",
"a",
"tree",
"anyway"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1390-L1397 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | recoverMemory | def recoverMemory(buffer, size):
"""parse an XML in-memory block and build a tree. In the case
the document is not Well Formed, an attempt to build a tree
is tried anyway """
ret = libxml2mod.xmlRecoverMemory(buffer, size)
if ret is None:raise treeError('xmlRecoverMemory() failed')
return xmlDoc(_obj=ret) | python | def recoverMemory(buffer, size):
"""parse an XML in-memory block and build a tree. In the case
the document is not Well Formed, an attempt to build a tree
is tried anyway """
ret = libxml2mod.xmlRecoverMemory(buffer, size)
if ret is None:raise treeError('xmlRecoverMemory() failed')
return xmlDoc(_obj=ret) | [
"def",
"recoverMemory",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRecoverMemory",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRecoverMemory() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML in-memory block and build a tree. In the case
the document is not Well Formed, an attempt to build a tree
is tried anyway | [
"parse",
"an",
"XML",
"in",
"-",
"memory",
"block",
"and",
"build",
"a",
"tree",
".",
"In",
"the",
"case",
"the",
"document",
"is",
"not",
"Well",
"Formed",
"an",
"attempt",
"to",
"build",
"a",
"tree",
"is",
"tried",
"anyway"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1399-L1405 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | copyChar | def copyChar(len, out, val):
"""append the char value in the array """
ret = libxml2mod.xmlCopyChar(len, out, val)
return ret | python | def copyChar(len, out, val):
"""append the char value in the array """
ret = libxml2mod.xmlCopyChar(len, out, val)
return ret | [
"def",
"copyChar",
"(",
"len",
",",
"out",
",",
"val",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyChar",
"(",
"len",
",",
"out",
",",
"val",
")",
"return",
"ret"
] | append the char value in the array | [
"append",
"the",
"char",
"value",
"in",
"the",
"array"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1455-L1458 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createEntityParserCtxt | def createEntityParserCtxt(URL, ID, base):
"""Create a parser context for an external entity Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. """
ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def createEntityParserCtxt(URL, ID, base):
"""Create a parser context for an external entity Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. """
ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"createEntityParserCtxt",
"(",
"URL",
",",
"ID",
",",
"base",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateEntityParserCtxt",
"(",
"URL",
",",
"ID",
",",
"base",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreateEntityParserCtxt() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a parser context for an external entity Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. | [
"Create",
"a",
"parser",
"context",
"for",
"an",
"external",
"entity",
"Automatic",
"support",
"for",
"ZLIB",
"/",
"Compress",
"compressed",
"document",
"is",
"provided",
"by",
"default",
"if",
"found",
"at",
"compile",
"-",
"time",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1465-L1471 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createFileParserCtxt | def createFileParserCtxt(filename):
"""Create a parser context for a file content. Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. """
ret = libxml2mod.xmlCreateFileParserCtxt(filename)
if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def createFileParserCtxt(filename):
"""Create a parser context for a file content. Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. """
ret = libxml2mod.xmlCreateFileParserCtxt(filename)
if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"createFileParserCtxt",
"(",
"filename",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateFileParserCtxt",
"(",
"filename",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreateFileParserCtxt() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a parser context for a file content. Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. | [
"Create",
"a",
"parser",
"context",
"for",
"a",
"file",
"content",
".",
"Automatic",
"support",
"for",
"ZLIB",
"/",
"Compress",
"compressed",
"document",
"is",
"provided",
"by",
"default",
"if",
"found",
"at",
"compile",
"-",
"time",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1473-L1479 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createMemoryParserCtxt | def createMemoryParserCtxt(buffer, size):
"""Create a parser context for an XML in-memory document. """
ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def createMemoryParserCtxt(buffer, size):
"""Create a parser context for an XML in-memory document. """
ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"createMemoryParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateMemoryParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreateMemoryParserCtxt() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a parser context for an XML in-memory document. | [
"Create",
"a",
"parser",
"context",
"for",
"an",
"XML",
"in",
"-",
"memory",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1481-L1485 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createURLParserCtxt | def createURLParserCtxt(filename, options):
"""Create a parser context for a file or URL content.
Automatic support for ZLIB/Compress compressed document is
provided by default if found at compile-time and for file
accesses """
ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def createURLParserCtxt(filename, options):
"""Create a parser context for a file or URL content.
Automatic support for ZLIB/Compress compressed document is
provided by default if found at compile-time and for file
accesses """
ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"createURLParserCtxt",
"(",
"filename",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateURLParserCtxt",
"(",
"filename",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreateURLParserCtxt() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a parser context for a file or URL content.
Automatic support for ZLIB/Compress compressed document is
provided by default if found at compile-time and for file
accesses | [
"Create",
"a",
"parser",
"context",
"for",
"a",
"file",
"or",
"URL",
"content",
".",
"Automatic",
"support",
"for",
"ZLIB",
"/",
"Compress",
"compressed",
"document",
"is",
"provided",
"by",
"default",
"if",
"found",
"at",
"compile",
"-",
"time",
"and",
"for",
"file",
"accesses"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1487-L1494 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlCreateFileParserCtxt | def htmlCreateFileParserCtxt(filename, encoding):
"""Create a parser context for a file content. Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. """
ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def htmlCreateFileParserCtxt(filename, encoding):
"""Create a parser context for a file content. Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. """
ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"htmlCreateFileParserCtxt",
"(",
"filename",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlCreateFileParserCtxt",
"(",
"filename",
",",
"encoding",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'htmlCreateFileParserCtxt() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a parser context for a file content. Automatic
support for ZLIB/Compress compressed document is provided
by default if found at compile-time. | [
"Create",
"a",
"parser",
"context",
"for",
"a",
"file",
"content",
".",
"Automatic",
"support",
"for",
"ZLIB",
"/",
"Compress",
"compressed",
"document",
"is",
"provided",
"by",
"default",
"if",
"found",
"at",
"compile",
"-",
"time",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1496-L1502 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | namePop | def namePop(ctxt):
"""Pops the top element name from the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePop(ctxt__o)
return ret | python | def namePop(ctxt):
"""Pops the top element name from the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePop(ctxt__o)
return ret | [
"def",
"namePop",
"(",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"namePop",
"(",
"ctxt__o",
")",
"return",
"ret"
] | Pops the top element name from the name stack | [
"Pops",
"the",
"top",
"element",
"name",
"from",
"the",
"name",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1517-L1522 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | namePush | def namePush(ctxt, value):
"""Pushes a new element name on top of the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePush(ctxt__o, value)
return ret | python | def namePush(ctxt, value):
"""Pushes a new element name on top of the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePush(ctxt__o, value)
return ret | [
"def",
"namePush",
"(",
"ctxt",
",",
"value",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"namePush",
"(",
"ctxt__o",
",",
"value",
")",
"return",
"ret"
] | Pushes a new element name on top of the name stack | [
"Pushes",
"a",
"new",
"element",
"name",
"on",
"top",
"of",
"the",
"name",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1524-L1529 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | nodePop | def nodePop(ctxt):
"""Pops the top element node from the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.nodePop(ctxt__o)
if ret is None:raise treeError('nodePop() failed')
return xmlNode(_obj=ret) | python | def nodePop(ctxt):
"""Pops the top element node from the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.nodePop(ctxt__o)
if ret is None:raise treeError('nodePop() failed')
return xmlNode(_obj=ret) | [
"def",
"nodePop",
"(",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"nodePop",
"(",
"ctxt__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'nodePop() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Pops the top element node from the node stack | [
"Pops",
"the",
"top",
"element",
"node",
"from",
"the",
"node",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1531-L1537 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | nodePush | def nodePush(ctxt, value):
"""Pushes a new element node on top of the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if value is None: value__o = None
else: value__o = value._o
ret = libxml2mod.nodePush(ctxt__o, value__o)
return ret | python | def nodePush(ctxt, value):
"""Pushes a new element node on top of the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if value is None: value__o = None
else: value__o = value._o
ret = libxml2mod.nodePush(ctxt__o, value__o)
return ret | [
"def",
"nodePush",
"(",
"ctxt",
",",
"value",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"if",
"value",
"is",
"None",
":",
"value__o",
"=",
"None",
"else",
":",
"value__o",
"=",
"value",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"nodePush",
"(",
"ctxt__o",
",",
"value__o",
")",
"return",
"ret"
] | Pushes a new element node on top of the node stack | [
"Pushes",
"a",
"new",
"element",
"node",
"on",
"top",
"of",
"the",
"node",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1539-L1546 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createInputBuffer | def createInputBuffer(file, encoding):
"""Create a libxml2 input buffer from a Python file """
ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateInputBuffer() failed')
return inputBuffer(_obj=ret) | python | def createInputBuffer(file, encoding):
"""Create a libxml2 input buffer from a Python file """
ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateInputBuffer() failed')
return inputBuffer(_obj=ret) | [
"def",
"createInputBuffer",
"(",
"file",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateInputBuffer",
"(",
"file",
",",
"encoding",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCreateInputBuffer() failed'",
")",
"return",
"inputBuffer",
"(",
"_obj",
"=",
"ret",
")"
] | Create a libxml2 input buffer from a Python file | [
"Create",
"a",
"libxml2",
"input",
"buffer",
"from",
"a",
"Python",
"file"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1557-L1561 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createOutputBuffer | def createOutputBuffer(file, encoding):
"""Create a libxml2 output buffer from a Python file """
ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
return outputBuffer(_obj=ret) | python | def createOutputBuffer(file, encoding):
"""Create a libxml2 output buffer from a Python file """
ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
return outputBuffer(_obj=ret) | [
"def",
"createOutputBuffer",
"(",
"file",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateOutputBuffer",
"(",
"file",
",",
"encoding",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCreateOutputBuffer() failed'",
")",
"return",
"outputBuffer",
"(",
"_obj",
"=",
"ret",
")"
] | Create a libxml2 output buffer from a Python file | [
"Create",
"a",
"libxml2",
"output",
"buffer",
"from",
"a",
"Python",
"file"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1563-L1567 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createPushParser | def createPushParser(SAX, chunk, size, URI):
"""Create a progressive XML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('xmlCreatePushParser() failed')
return parserCtxt(_obj=ret) | python | def createPushParser(SAX, chunk, size, URI):
"""Create a progressive XML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('xmlCreatePushParser() failed')
return parserCtxt(_obj=ret) | [
"def",
"createPushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreatePushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreatePushParser() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a progressive XML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. | [
"Create",
"a",
"progressive",
"XML",
"parser",
"context",
"to",
"build",
"either",
"an",
"event",
"flow",
"if",
"the",
"SAX",
"object",
"is",
"not",
"None",
"or",
"a",
"DOM",
"tree",
"otherwise",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1569-L1575 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlCreatePushParser | def htmlCreatePushParser(SAX, chunk, size, URI):
"""Create a progressive HTML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('htmlCreatePushParser() failed')
return parserCtxt(_obj=ret) | python | def htmlCreatePushParser(SAX, chunk, size, URI):
"""Create a progressive HTML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('htmlCreatePushParser() failed')
return parserCtxt(_obj=ret) | [
"def",
"htmlCreatePushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlCreatePushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'htmlCreatePushParser() failed'",
")",
"return",
"parserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create a progressive HTML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. | [
"Create",
"a",
"progressive",
"HTML",
"parser",
"context",
"to",
"build",
"either",
"an",
"event",
"flow",
"if",
"the",
"SAX",
"object",
"is",
"not",
"None",
"or",
"a",
"DOM",
"tree",
"otherwise",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1588-L1594 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newNode | def newNode(name):
"""Create a new Node """
ret = libxml2mod.xmlNewNode(name)
if ret is None:raise treeError('xmlNewNode() failed')
return xmlNode(_obj=ret) | python | def newNode(name):
"""Create a new Node """
ret = libxml2mod.xmlNewNode(name)
if ret is None:raise treeError('xmlNewNode() failed')
return xmlNode(_obj=ret) | [
"def",
"newNode",
"(",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewNode",
"(",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewNode() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Create a new Node | [
"Create",
"a",
"new",
"Node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1606-L1610 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | relaxNGNewMemParserCtxt | def relaxNGNewMemParserCtxt(buffer, size):
"""Create an XML RelaxNGs parse context for that memory buffer
expected to contain an XML RelaxNGs file. """
ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
return relaxNgParserCtxt(_obj=ret) | python | def relaxNGNewMemParserCtxt(buffer, size):
"""Create an XML RelaxNGs parse context for that memory buffer
expected to contain an XML RelaxNGs file. """
ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
return relaxNgParserCtxt(_obj=ret) | [
"def",
"relaxNGNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlRelaxNGNewMemParserCtxt() failed'",
")",
"return",
"relaxNgParserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create an XML RelaxNGs parse context for that memory buffer
expected to contain an XML RelaxNGs file. | [
"Create",
"an",
"XML",
"RelaxNGs",
"parse",
"context",
"for",
"that",
"memory",
"buffer",
"expected",
"to",
"contain",
"an",
"XML",
"RelaxNGs",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1641-L1646 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | relaxNGNewParserCtxt | def relaxNGNewParserCtxt(URL):
"""Create an XML RelaxNGs parse context for that file/resource
expected to contain an XML RelaxNGs file. """
ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
return relaxNgParserCtxt(_obj=ret) | python | def relaxNGNewParserCtxt(URL):
"""Create an XML RelaxNGs parse context for that file/resource
expected to contain an XML RelaxNGs file. """
ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
return relaxNgParserCtxt(_obj=ret) | [
"def",
"relaxNGNewParserCtxt",
"(",
"URL",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGNewParserCtxt",
"(",
"URL",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlRelaxNGNewParserCtxt() failed'",
")",
"return",
"relaxNgParserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create an XML RelaxNGs parse context for that file/resource
expected to contain an XML RelaxNGs file. | [
"Create",
"an",
"XML",
"RelaxNGs",
"parse",
"context",
"for",
"that",
"file",
"/",
"resource",
"expected",
"to",
"contain",
"an",
"XML",
"RelaxNGs",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1648-L1653 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | buildQName | def buildQName(ncname, prefix, memory, len):
"""Builds the QName @prefix:@ncname in @memory if there is
enough space and prefix is not None nor empty, otherwise
allocate a new string. If prefix is None or empty it
returns ncname. """
ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
return ret | python | def buildQName(ncname, prefix, memory, len):
"""Builds the QName @prefix:@ncname in @memory if there is
enough space and prefix is not None nor empty, otherwise
allocate a new string. If prefix is None or empty it
returns ncname. """
ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
return ret | [
"def",
"buildQName",
"(",
"ncname",
",",
"prefix",
",",
"memory",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlBuildQName",
"(",
"ncname",
",",
"prefix",
",",
"memory",
",",
"len",
")",
"return",
"ret"
] | Builds the QName @prefix:@ncname in @memory if there is
enough space and prefix is not None nor empty, otherwise
allocate a new string. If prefix is None or empty it
returns ncname. | [
"Builds",
"the",
"QName"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1659-L1665 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newComment | def newComment(content):
"""Creation of a new node containing a comment. """
ret = libxml2mod.xmlNewComment(content)
if ret is None:raise treeError('xmlNewComment() failed')
return xmlNode(_obj=ret) | python | def newComment(content):
"""Creation of a new node containing a comment. """
ret = libxml2mod.xmlNewComment(content)
if ret is None:raise treeError('xmlNewComment() failed')
return xmlNode(_obj=ret) | [
"def",
"newComment",
"(",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewComment",
"(",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewComment() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Creation of a new node containing a comment. | [
"Creation",
"of",
"a",
"new",
"node",
"containing",
"a",
"comment",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1677-L1681 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newDoc | def newDoc(version):
"""Creates a new XML document """
ret = libxml2mod.xmlNewDoc(version)
if ret is None:raise treeError('xmlNewDoc() failed')
return xmlDoc(_obj=ret) | python | def newDoc(version):
"""Creates a new XML document """
ret = libxml2mod.xmlNewDoc(version)
if ret is None:raise treeError('xmlNewDoc() failed')
return xmlDoc(_obj=ret) | [
"def",
"newDoc",
"(",
"version",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDoc",
"(",
"version",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDoc() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | Creates a new XML document | [
"Creates",
"a",
"new",
"XML",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1683-L1687 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newPI | def newPI(name, content):
"""Creation of a processing instruction element. Use
xmlDocNewPI preferably to get string interning """
ret = libxml2mod.xmlNewPI(name, content)
if ret is None:raise treeError('xmlNewPI() failed')
return xmlNode(_obj=ret) | python | def newPI(name, content):
"""Creation of a processing instruction element. Use
xmlDocNewPI preferably to get string interning """
ret = libxml2mod.xmlNewPI(name, content)
if ret is None:raise treeError('xmlNewPI() failed')
return xmlNode(_obj=ret) | [
"def",
"newPI",
"(",
"name",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewPI",
"(",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewPI() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Creation of a processing instruction element. Use
xmlDocNewPI preferably to get string interning | [
"Creation",
"of",
"a",
"processing",
"instruction",
"element",
".",
"Use",
"xmlDocNewPI",
"preferably",
"to",
"get",
"string",
"interning"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1689-L1694 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newText | def newText(content):
"""Creation of a new text node. """
ret = libxml2mod.xmlNewText(content)
if ret is None:raise treeError('xmlNewText() failed')
return xmlNode(_obj=ret) | python | def newText(content):
"""Creation of a new text node. """
ret = libxml2mod.xmlNewText(content)
if ret is None:raise treeError('xmlNewText() failed')
return xmlNode(_obj=ret) | [
"def",
"newText",
"(",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewText",
"(",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewText() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Creation of a new text node. | [
"Creation",
"of",
"a",
"new",
"text",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1696-L1700 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newTextLen | def newTextLen(content, len):
"""Creation of a new text node with an extra parameter for the
content's length """
ret = libxml2mod.xmlNewTextLen(content, len)
if ret is None:raise treeError('xmlNewTextLen() failed')
return xmlNode(_obj=ret) | python | def newTextLen(content, len):
"""Creation of a new text node with an extra parameter for the
content's length """
ret = libxml2mod.xmlNewTextLen(content, len)
if ret is None:raise treeError('xmlNewTextLen() failed')
return xmlNode(_obj=ret) | [
"def",
"newTextLen",
"(",
"content",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewTextLen",
"(",
"content",
",",
"len",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewTextLen() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Creation of a new text node with an extra parameter for the
content's length | [
"Creation",
"of",
"a",
"new",
"text",
"node",
"with",
"an",
"extra",
"parameter",
"for",
"the",
"content",
"s",
"length"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1702-L1707 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | URIUnescapeString | def URIUnescapeString(str, len, target):
"""Unescaping routine, but does not check that the string is
an URI. The output is a direct unsigned char translation of
%XX values (no encoding) Note that the length of the result
can only be smaller or same size as the input string. """
ret = libxml2mod.xmlURIUnescapeString(str, len, target)
return ret | python | def URIUnescapeString(str, len, target):
"""Unescaping routine, but does not check that the string is
an URI. The output is a direct unsigned char translation of
%XX values (no encoding) Note that the length of the result
can only be smaller or same size as the input string. """
ret = libxml2mod.xmlURIUnescapeString(str, len, target)
return ret | [
"def",
"URIUnescapeString",
"(",
"str",
",",
"len",
",",
"target",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlURIUnescapeString",
"(",
"str",
",",
"len",
",",
"target",
")",
"return",
"ret"
] | Unescaping routine, but does not check that the string is
an URI. The output is a direct unsigned char translation of
%XX values (no encoding) Note that the length of the result
can only be smaller or same size as the input string. | [
"Unescaping",
"routine",
"but",
"does",
"not",
"check",
"that",
"the",
"string",
"is",
"an",
"URI",
".",
"The",
"output",
"is",
"a",
"direct",
"unsigned",
"char",
"translation",
"of",
"%XX",
"values",
"(",
"no",
"encoding",
")",
"Note",
"that",
"the",
"length",
"of",
"the",
"result",
"can",
"only",
"be",
"smaller",
"or",
"same",
"size",
"as",
"the",
"input",
"string",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1751-L1757 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | parseURI | def parseURI(str):
"""Parse an URI based on RFC 3986 URI-reference = [
absoluteURI | relativeURI ] [ "#" fragment ] """
ret = libxml2mod.xmlParseURI(str)
if ret is None:raise uriError('xmlParseURI() failed')
return URI(_obj=ret) | python | def parseURI(str):
"""Parse an URI based on RFC 3986 URI-reference = [
absoluteURI | relativeURI ] [ "#" fragment ] """
ret = libxml2mod.xmlParseURI(str)
if ret is None:raise uriError('xmlParseURI() failed')
return URI(_obj=ret) | [
"def",
"parseURI",
"(",
"str",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlParseURI",
"(",
"str",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"uriError",
"(",
"'xmlParseURI() failed'",
")",
"return",
"URI",
"(",
"_obj",
"=",
"ret",
")"
] | Parse an URI based on RFC 3986 URI-reference = [
absoluteURI | relativeURI ] [ "#" fragment ] | [
"Parse",
"an",
"URI",
"based",
"on",
"RFC",
"3986",
"URI",
"-",
"reference",
"=",
"[",
"absoluteURI",
"|",
"relativeURI",
"]",
"[",
"#",
"fragment",
"]"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1809-L1814 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | parseURIRaw | def parseURIRaw(str, raw):
"""Parse an URI but allows to keep intact the original
fragments. URI-reference = URI / relative-ref """
ret = libxml2mod.xmlParseURIRaw(str, raw)
if ret is None:raise uriError('xmlParseURIRaw() failed')
return URI(_obj=ret) | python | def parseURIRaw(str, raw):
"""Parse an URI but allows to keep intact the original
fragments. URI-reference = URI / relative-ref """
ret = libxml2mod.xmlParseURIRaw(str, raw)
if ret is None:raise uriError('xmlParseURIRaw() failed')
return URI(_obj=ret) | [
"def",
"parseURIRaw",
"(",
"str",
",",
"raw",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlParseURIRaw",
"(",
"str",
",",
"raw",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"uriError",
"(",
"'xmlParseURIRaw() failed'",
")",
"return",
"URI",
"(",
"_obj",
"=",
"ret",
")"
] | Parse an URI but allows to keep intact the original
fragments. URI-reference = URI / relative-ref | [
"Parse",
"an",
"URI",
"but",
"allows",
"to",
"keep",
"intact",
"the",
"original",
"fragments",
".",
"URI",
"-",
"reference",
"=",
"URI",
"/",
"relative",
"-",
"ref"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1816-L1821 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newTextReaderFilename | def newTextReaderFilename(URI):
"""Create an xmlTextReader structure fed with the resource at
@URI """
ret = libxml2mod.xmlNewTextReaderFilename(URI)
if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
return xmlTextReader(_obj=ret) | python | def newTextReaderFilename(URI):
"""Create an xmlTextReader structure fed with the resource at
@URI """
ret = libxml2mod.xmlNewTextReaderFilename(URI)
if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
return xmlTextReader(_obj=ret) | [
"def",
"newTextReaderFilename",
"(",
"URI",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewTextReaderFilename",
"(",
"URI",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewTextReaderFilename() failed'",
")",
"return",
"xmlTextReader",
"(",
"_obj",
"=",
"ret",
")"
] | Create an xmlTextReader structure fed with the resource at
@URI | [
"Create",
"an",
"xmlTextReader",
"structure",
"fed",
"with",
"the",
"resource",
"at"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1941-L1946 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readerForDoc | def readerForDoc(cur, URL, encoding, options):
"""Create an xmltextReader for an XML in-memory document. The
parsing flags @options are a combination of xmlParserOption. """
ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
if ret is None:raise treeError('xmlReaderForDoc() failed')
return xmlTextReader(_obj=ret) | python | def readerForDoc(cur, URL, encoding, options):
"""Create an xmltextReader for an XML in-memory document. The
parsing flags @options are a combination of xmlParserOption. """
ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
if ret is None:raise treeError('xmlReaderForDoc() failed')
return xmlTextReader(_obj=ret) | [
"def",
"readerForDoc",
"(",
"cur",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReaderForDoc",
"(",
"cur",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReaderForDoc() failed'",
")",
"return",
"xmlTextReader",
"(",
"_obj",
"=",
"ret",
")"
] | Create an xmltextReader for an XML in-memory document. The
parsing flags @options are a combination of xmlParserOption. | [
"Create",
"an",
"xmltextReader",
"for",
"an",
"XML",
"in",
"-",
"memory",
"document",
".",
"The",
"parsing",
"flags"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1948-L1953 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readerForFd | def readerForFd(fd, URL, encoding, options):
"""Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. """
ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
if ret is None:raise treeError('xmlReaderForFd() failed')
return xmlTextReader(_obj=ret) | python | def readerForFd(fd, URL, encoding, options):
"""Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. """
ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
if ret is None:raise treeError('xmlReaderForFd() failed')
return xmlTextReader(_obj=ret) | [
"def",
"readerForFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReaderForFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReaderForFd() failed'",
")",
"return",
"xmlTextReader",
"(",
"_obj",
"=",
"ret",
")"
] | Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. | [
"Create",
"an",
"xmltextReader",
"for",
"an",
"XML",
"from",
"a",
"file",
"descriptor",
".",
"The",
"parsing",
"flags"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1955-L1962 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readerForFile | def readerForFile(filename, encoding, options):
"""parse an XML file from the filesystem or the network. The
parsing flags @options are a combination of xmlParserOption. """
ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
if ret is None:raise treeError('xmlReaderForFile() failed')
return xmlTextReader(_obj=ret) | python | def readerForFile(filename, encoding, options):
"""parse an XML file from the filesystem or the network. The
parsing flags @options are a combination of xmlParserOption. """
ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
if ret is None:raise treeError('xmlReaderForFile() failed')
return xmlTextReader(_obj=ret) | [
"def",
"readerForFile",
"(",
"filename",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReaderForFile",
"(",
"filename",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReaderForFile() failed'",
")",
"return",
"xmlTextReader",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML file from the filesystem or the network. The
parsing flags @options are a combination of xmlParserOption. | [
"parse",
"an",
"XML",
"file",
"from",
"the",
"filesystem",
"or",
"the",
"network",
".",
"The",
"parsing",
"flags"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1964-L1969 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readerForMemory | def readerForMemory(buffer, size, URL, encoding, options):
"""Create an xmltextReader for an XML in-memory document. The
parsing flags @options are a combination of xmlParserOption. """
ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
if ret is None:raise treeError('xmlReaderForMemory() failed')
return xmlTextReader(_obj=ret) | python | def readerForMemory(buffer, size, URL, encoding, options):
"""Create an xmltextReader for an XML in-memory document. The
parsing flags @options are a combination of xmlParserOption. """
ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
if ret is None:raise treeError('xmlReaderForMemory() failed')
return xmlTextReader(_obj=ret) | [
"def",
"readerForMemory",
"(",
"buffer",
",",
"size",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReaderForMemory",
"(",
"buffer",
",",
"size",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReaderForMemory() failed'",
")",
"return",
"xmlTextReader",
"(",
"_obj",
"=",
"ret",
")"
] | Create an xmltextReader for an XML in-memory document. The
parsing flags @options are a combination of xmlParserOption. | [
"Create",
"an",
"xmltextReader",
"for",
"an",
"XML",
"in",
"-",
"memory",
"document",
".",
"The",
"parsing",
"flags"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1971-L1976 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | regexpCompile | def regexpCompile(regexp):
"""Parses a regular expression conforming to XML Schemas Part
2 Datatype Appendix F and builds an automata suitable for
testing strings against that regular expression """
ret = libxml2mod.xmlRegexpCompile(regexp)
if ret is None:raise treeError('xmlRegexpCompile() failed')
return xmlReg(_obj=ret) | python | def regexpCompile(regexp):
"""Parses a regular expression conforming to XML Schemas Part
2 Datatype Appendix F and builds an automata suitable for
testing strings against that regular expression """
ret = libxml2mod.xmlRegexpCompile(regexp)
if ret is None:raise treeError('xmlRegexpCompile() failed')
return xmlReg(_obj=ret) | [
"def",
"regexpCompile",
"(",
"regexp",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRegexpCompile",
"(",
"regexp",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRegexpCompile() failed'",
")",
"return",
"xmlReg",
"(",
"_obj",
"=",
"ret",
")"
] | Parses a regular expression conforming to XML Schemas Part
2 Datatype Appendix F and builds an automata suitable for
testing strings against that regular expression | [
"Parses",
"a",
"regular",
"expression",
"conforming",
"to",
"XML",
"Schemas",
"Part",
"2",
"Datatype",
"Appendix",
"F",
"and",
"builds",
"an",
"automata",
"suitable",
"for",
"testing",
"strings",
"against",
"that",
"regular",
"expression"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1982-L1988 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | schemaNewMemParserCtxt | def schemaNewMemParserCtxt(buffer, size):
"""Create an XML Schemas parse context for that memory buffer
expected to contain an XML Schemas file. """
ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
return SchemaParserCtxt(_obj=ret) | python | def schemaNewMemParserCtxt(buffer, size):
"""Create an XML Schemas parse context for that memory buffer
expected to contain an XML Schemas file. """
ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
return SchemaParserCtxt(_obj=ret) | [
"def",
"schemaNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSchemaNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlSchemaNewMemParserCtxt() failed'",
")",
"return",
"SchemaParserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create an XML Schemas parse context for that memory buffer
expected to contain an XML Schemas file. | [
"Create",
"an",
"XML",
"Schemas",
"parse",
"context",
"for",
"that",
"memory",
"buffer",
"expected",
"to",
"contain",
"an",
"XML",
"Schemas",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1994-L1999 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | schemaNewParserCtxt | def schemaNewParserCtxt(URL):
"""Create an XML Schemas parse context for that file/resource
expected to contain an XML Schemas file. """
ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
return SchemaParserCtxt(_obj=ret) | python | def schemaNewParserCtxt(URL):
"""Create an XML Schemas parse context for that file/resource
expected to contain an XML Schemas file. """
ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
return SchemaParserCtxt(_obj=ret) | [
"def",
"schemaNewParserCtxt",
"(",
"URL",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSchemaNewParserCtxt",
"(",
"URL",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlSchemaNewParserCtxt() failed'",
")",
"return",
"SchemaParserCtxt",
"(",
"_obj",
"=",
"ret",
")"
] | Create an XML Schemas parse context for that file/resource
expected to contain an XML Schemas file. | [
"Create",
"an",
"XML",
"Schemas",
"parse",
"context",
"for",
"that",
"file",
"/",
"resource",
"expected",
"to",
"contain",
"an",
"XML",
"Schemas",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L2001-L2006 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | UTF8Strsub | def UTF8Strsub(utf, start, len):
"""Create a substring from a given UTF-8 string Note:
positions are given in units of UTF-8 chars """
ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
return ret | python | def UTF8Strsub(utf, start, len):
"""Create a substring from a given UTF-8 string Note:
positions are given in units of UTF-8 chars """
ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
return ret | [
"def",
"UTF8Strsub",
"(",
"utf",
",",
"start",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlUTF8Strsub",
"(",
"utf",
",",
"start",
",",
"len",
")",
"return",
"ret"
] | Create a substring from a given UTF-8 string Note:
positions are given in units of UTF-8 chars | [
"Create",
"a",
"substring",
"from",
"a",
"given",
"UTF",
"-",
"8",
"string",
"Note",
":",
"positions",
"are",
"given",
"in",
"units",
"of",
"UTF",
"-",
"8",
"chars"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L2072-L2076 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | valuePop | def valuePop(ctxt):
"""Pops the top XPath object from the value stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.valuePop(ctxt__o)
return ret | python | def valuePop(ctxt):
"""Pops the top XPath object from the value stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.valuePop(ctxt__o)
return ret | [
"def",
"valuePop",
"(",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"valuePop",
"(",
"ctxt__o",
")",
"return",
"ret"
] | Pops the top XPath object from the value stack | [
"Pops",
"the",
"top",
"XPath",
"object",
"from",
"the",
"value",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3008-L3013 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlCore.removeNsDef | def removeNsDef(self, href):
"""
Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be left with dangling links. You should call
renconciliateNs() to fix those pointers.
Note: This method does not free memory taken by the ns
definitions. You will need to free it manually with the
freeNsList() method on the returns xmlNs object.
"""
ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp | python | def removeNsDef(self, href):
"""
Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be left with dangling links. You should call
renconciliateNs() to fix those pointers.
Note: This method does not free memory taken by the ns
definitions. You will need to free it manually with the
freeNsList() method on the returns xmlNs object.
"""
ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"removeNsDef",
"(",
"self",
",",
"href",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeRemoveNsDef",
"(",
"self",
".",
"_o",
",",
"href",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be left with dangling links. You should call
renconciliateNs() to fix those pointers.
Note: This method does not free memory taken by the ns
definitions. You will need to free it manually with the
freeNsList() method on the returns xmlNs object. | [
"Remove",
"a",
"namespace",
"definition",
"from",
"a",
"node",
".",
"If",
"href",
"is",
"None",
"remove",
"all",
"of",
"the",
"ns",
"definitions",
"on",
"that",
"node",
".",
"The",
"removed",
"namespaces",
"are",
"returned",
"as",
"a",
"linked",
"list",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L489-L507 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | parserCtxtCore.setErrorHandler | def setErrorHandler(self,f,arg):
"""Register an error handler that will be called back as
f(arg,msg,severity,reserved).
@reserved is currently always None."""
libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg) | python | def setErrorHandler(self,f,arg):
"""Register an error handler that will be called back as
f(arg,msg,severity,reserved).
@reserved is currently always None."""
libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg) | [
"def",
"setErrorHandler",
"(",
"self",
",",
"f",
",",
"arg",
")",
":",
"libxml2mod",
".",
"xmlParserCtxtSetErrorHandler",
"(",
"self",
".",
"_o",
",",
"f",
",",
"arg",
")"
] | Register an error handler that will be called back as
f(arg,msg,severity,reserved).
@reserved is currently always None. | [
"Register",
"an",
"error",
"handler",
"that",
"will",
"be",
"called",
"back",
"as",
"f",
"(",
"arg",
"msg",
"severity",
"reserved",
")",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L657-L662 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | ValidCtxtCore.setValidityErrorHandler | def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for DTD validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg) | python | def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for DTD validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg) | [
"def",
"setValidityErrorHandler",
"(",
"self",
",",
"err_func",
",",
"warn_func",
",",
"arg",
"=",
"None",
")",
":",
"libxml2mod",
".",
"xmlSetValidErrors",
"(",
"self",
".",
"_o",
",",
"err_func",
",",
"warn_func",
",",
"arg",
")"
] | Register error and warning handlers for DTD validation.
These will be called back as f(msg,arg) | [
"Register",
"error",
"and",
"warning",
"handlers",
"for",
"DTD",
"validation",
".",
"These",
"will",
"be",
"called",
"back",
"as",
"f",
"(",
"msg",
"arg",
")"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L679-L684 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | SchemaValidCtxtCore.setValidityErrorHandler | def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for Schema validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg) | python | def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for Schema validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg) | [
"def",
"setValidityErrorHandler",
"(",
"self",
",",
"err_func",
",",
"warn_func",
",",
"arg",
"=",
"None",
")",
":",
"libxml2mod",
".",
"xmlSchemaSetValidErrors",
"(",
"self",
".",
"_o",
",",
"err_func",
",",
"warn_func",
",",
"arg",
")"
] | Register error and warning handlers for Schema validation.
These will be called back as f(msg,arg) | [
"Register",
"error",
"and",
"warning",
"handlers",
"for",
"Schema",
"validation",
".",
"These",
"will",
"be",
"called",
"back",
"as",
"f",
"(",
"msg",
"arg",
")"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L692-L697 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | relaxNgValidCtxtCore.setValidityErrorHandler | def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for RelaxNG validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg) | python | def setValidityErrorHandler(self, err_func, warn_func, arg=None):
"""
Register error and warning handlers for RelaxNG validation.
These will be called back as f(msg,arg)
"""
libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg) | [
"def",
"setValidityErrorHandler",
"(",
"self",
",",
"err_func",
",",
"warn_func",
",",
"arg",
"=",
"None",
")",
":",
"libxml2mod",
".",
"xmlRelaxNGSetValidErrors",
"(",
"self",
".",
"_o",
",",
"err_func",
",",
"warn_func",
",",
"arg",
")"
] | Register error and warning handlers for RelaxNG validation.
These will be called back as f(msg,arg) | [
"Register",
"error",
"and",
"warning",
"handlers",
"for",
"RelaxNG",
"validation",
".",
"These",
"will",
"be",
"called",
"back",
"as",
"f",
"(",
"msg",
"arg",
")"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L705-L710 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlTextReaderCore.SetErrorHandler | def SetErrorHandler(self,f,arg):
"""Register an error handler that will be called back as
f(arg,msg,severity,locator)."""
if f is None:
libxml2mod.xmlTextReaderSetErrorHandler(\
self._o,None,None)
else:
libxml2mod.xmlTextReaderSetErrorHandler(\
self._o,_xmlTextReaderErrorFunc,(f,arg)) | python | def SetErrorHandler(self,f,arg):
"""Register an error handler that will be called back as
f(arg,msg,severity,locator)."""
if f is None:
libxml2mod.xmlTextReaderSetErrorHandler(\
self._o,None,None)
else:
libxml2mod.xmlTextReaderSetErrorHandler(\
self._o,_xmlTextReaderErrorFunc,(f,arg)) | [
"def",
"SetErrorHandler",
"(",
"self",
",",
"f",
",",
"arg",
")",
":",
"if",
"f",
"is",
"None",
":",
"libxml2mod",
".",
"xmlTextReaderSetErrorHandler",
"(",
"self",
".",
"_o",
",",
"None",
",",
"None",
")",
"else",
":",
"libxml2mod",
".",
"xmlTextReaderSetErrorHandler",
"(",
"self",
".",
"_o",
",",
"_xmlTextReaderErrorFunc",
",",
"(",
"f",
",",
"arg",
")",
")"
] | Register an error handler that will be called back as
f(arg,msg,severity,locator). | [
"Register",
"an",
"error",
"handler",
"that",
"will",
"be",
"called",
"back",
"as",
"f",
"(",
"arg",
"msg",
"severity",
"locator",
")",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L730-L738 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlTextReaderCore.GetErrorHandler | def GetErrorHandler(self):
"""Return (f,arg) as previously registered with setErrorHandler
or (None,None)."""
f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
if f is None:
return None,None
else:
# assert f is _xmlTextReaderErrorFunc
return arg | python | def GetErrorHandler(self):
"""Return (f,arg) as previously registered with setErrorHandler
or (None,None)."""
f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
if f is None:
return None,None
else:
# assert f is _xmlTextReaderErrorFunc
return arg | [
"def",
"GetErrorHandler",
"(",
"self",
")",
":",
"f",
",",
"arg",
"=",
"libxml2mod",
".",
"xmlTextReaderGetErrorHandler",
"(",
"self",
".",
"_o",
")",
"if",
"f",
"is",
"None",
":",
"return",
"None",
",",
"None",
"else",
":",
"# assert f is _xmlTextReaderErrorFunc",
"return",
"arg"
] | Return (f,arg) as previously registered with setErrorHandler
or (None,None). | [
"Return",
"(",
"f",
"arg",
")",
"as",
"previously",
"registered",
"with",
"setErrorHandler",
"or",
"(",
"None",
"None",
")",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L740-L748 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.ns | def ns(self):
"""Get the namespace of a node """
ret = libxml2mod.xmlNodeGetNs(self._o)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp | python | def ns(self):
"""Get the namespace of a node """
ret = libxml2mod.xmlNodeGetNs(self._o)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"ns",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeGetNs",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Get the namespace of a node | [
"Get",
"the",
"namespace",
"of",
"a",
"node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3025-L3030 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.nsDefs | def nsDefs(self):
"""Get the namespace of a node """
ret = libxml2mod.xmlNodeGetNsDefs(self._o)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp | python | def nsDefs(self):
"""Get the namespace of a node """
ret = libxml2mod.xmlNodeGetNsDefs(self._o)
if ret is None:return None
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"nsDefs",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeGetNsDefs",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Get the namespace of a node | [
"Get",
"the",
"namespace",
"of",
"a",
"node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3032-L3037 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.debugDumpNode | def debugDumpNode(self, output, depth):
"""Dumps debug information for the element node, it is
recursive """
libxml2mod.xmlDebugDumpNode(output, self._o, depth) | python | def debugDumpNode(self, output, depth):
"""Dumps debug information for the element node, it is
recursive """
libxml2mod.xmlDebugDumpNode(output, self._o, depth) | [
"def",
"debugDumpNode",
"(",
"self",
",",
"output",
",",
"depth",
")",
":",
"libxml2mod",
".",
"xmlDebugDumpNode",
"(",
"output",
",",
"self",
".",
"_o",
",",
"depth",
")"
] | Dumps debug information for the element node, it is
recursive | [
"Dumps",
"debug",
"information",
"for",
"the",
"element",
"node",
"it",
"is",
"recursive"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3043-L3046 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.debugDumpNodeList | def debugDumpNodeList(self, output, depth):
"""Dumps debug information for the list of element node, it is
recursive """
libxml2mod.xmlDebugDumpNodeList(output, self._o, depth) | python | def debugDumpNodeList(self, output, depth):
"""Dumps debug information for the list of element node, it is
recursive """
libxml2mod.xmlDebugDumpNodeList(output, self._o, depth) | [
"def",
"debugDumpNodeList",
"(",
"self",
",",
"output",
",",
"depth",
")",
":",
"libxml2mod",
".",
"xmlDebugDumpNodeList",
"(",
"output",
",",
"self",
".",
"_o",
",",
"depth",
")"
] | Dumps debug information for the list of element node, it is
recursive | [
"Dumps",
"debug",
"information",
"for",
"the",
"list",
"of",
"element",
"node",
"it",
"is",
"recursive"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3048-L3051 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.debugDumpOneNode | def debugDumpOneNode(self, output, depth):
"""Dumps debug information for the element node, it is not
recursive """
libxml2mod.xmlDebugDumpOneNode(output, self._o, depth) | python | def debugDumpOneNode(self, output, depth):
"""Dumps debug information for the element node, it is not
recursive """
libxml2mod.xmlDebugDumpOneNode(output, self._o, depth) | [
"def",
"debugDumpOneNode",
"(",
"self",
",",
"output",
",",
"depth",
")",
":",
"libxml2mod",
".",
"xmlDebugDumpOneNode",
"(",
"output",
",",
"self",
".",
"_o",
",",
"depth",
")"
] | Dumps debug information for the element node, it is not
recursive | [
"Dumps",
"debug",
"information",
"for",
"the",
"element",
"node",
"it",
"is",
"not",
"recursive"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3053-L3056 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addChild | def addChild(self, cur):
"""Add a new node to @parent, at the end of the child (or
property) list merging adjacent TEXT nodes (in which case
@cur is freed) If the new node is ATTRIBUTE, it is added
into properties instead of children. If there is an
attribute with equal name, it is first destroyed. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlAddChild(self._o, cur__o)
if ret is None:raise treeError('xmlAddChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def addChild(self, cur):
"""Add a new node to @parent, at the end of the child (or
property) list merging adjacent TEXT nodes (in which case
@cur is freed) If the new node is ATTRIBUTE, it is added
into properties instead of children. If there is an
attribute with equal name, it is first destroyed. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlAddChild(self._o, cur__o)
if ret is None:raise treeError('xmlAddChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"addChild",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddChild",
"(",
"self",
".",
"_o",
",",
"cur__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddChild() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Add a new node to @parent, at the end of the child (or
property) list merging adjacent TEXT nodes (in which case
@cur is freed) If the new node is ATTRIBUTE, it is added
into properties instead of children. If there is an
attribute with equal name, it is first destroyed. | [
"Add",
"a",
"new",
"node",
"to"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3075-L3086 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addChildList | def addChildList(self, cur):
"""Add a list of node at the end of the child list of the
parent merging adjacent TEXT nodes (@cur may be freed) """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlAddChildList(self._o, cur__o)
if ret is None:raise treeError('xmlAddChildList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def addChildList(self, cur):
"""Add a list of node at the end of the child list of the
parent merging adjacent TEXT nodes (@cur may be freed) """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlAddChildList(self._o, cur__o)
if ret is None:raise treeError('xmlAddChildList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"addChildList",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddChildList",
"(",
"self",
".",
"_o",
",",
"cur__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddChildList() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Add a list of node at the end of the child list of the
parent merging adjacent TEXT nodes (@cur may be freed) | [
"Add",
"a",
"list",
"of",
"node",
"at",
"the",
"end",
"of",
"the",
"child",
"list",
"of",
"the",
"parent",
"merging",
"adjacent",
"TEXT",
"nodes",
"("
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3088-L3096 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addContentLen | def addContentLen(self, content, len):
"""Append the extra substring to the node content. NOTE: In
contrast to xmlNodeSetContentLen(), @content is supposed to
be raw text, so unescaped XML special chars are allowed,
entity references are not supported. """
libxml2mod.xmlNodeAddContentLen(self._o, content, len) | python | def addContentLen(self, content, len):
"""Append the extra substring to the node content. NOTE: In
contrast to xmlNodeSetContentLen(), @content is supposed to
be raw text, so unescaped XML special chars are allowed,
entity references are not supported. """
libxml2mod.xmlNodeAddContentLen(self._o, content, len) | [
"def",
"addContentLen",
"(",
"self",
",",
"content",
",",
"len",
")",
":",
"libxml2mod",
".",
"xmlNodeAddContentLen",
"(",
"self",
".",
"_o",
",",
"content",
",",
"len",
")"
] | Append the extra substring to the node content. NOTE: In
contrast to xmlNodeSetContentLen(), @content is supposed to
be raw text, so unescaped XML special chars are allowed,
entity references are not supported. | [
"Append",
"the",
"extra",
"substring",
"to",
"the",
"node",
"content",
".",
"NOTE",
":",
"In",
"contrast",
"to",
"xmlNodeSetContentLen",
"()"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3105-L3110 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addNextSibling | def addNextSibling(self, elem):
"""Add a new node @elem as the next sibling of @cur If the new
node was already inserted in a document it is first
unlinked from its existing context. As a result of text
merging @elem may be freed. If the new node is ATTRIBUTE,
it is added into properties instead of children. If there
is an attribute with equal name, it is first destroyed. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
if ret is None:raise treeError('xmlAddNextSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def addNextSibling(self, elem):
"""Add a new node @elem as the next sibling of @cur If the new
node was already inserted in a document it is first
unlinked from its existing context. As a result of text
merging @elem may be freed. If the new node is ATTRIBUTE,
it is added into properties instead of children. If there
is an attribute with equal name, it is first destroyed. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
if ret is None:raise treeError('xmlAddNextSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"addNextSibling",
"(",
"self",
",",
"elem",
")",
":",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddNextSibling",
"(",
"self",
".",
"_o",
",",
"elem__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddNextSibling() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Add a new node @elem as the next sibling of @cur If the new
node was already inserted in a document it is first
unlinked from its existing context. As a result of text
merging @elem may be freed. If the new node is ATTRIBUTE,
it is added into properties instead of children. If there
is an attribute with equal name, it is first destroyed. | [
"Add",
"a",
"new",
"node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3112-L3124 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addPrevSibling | def addPrevSibling(self, elem):
"""Add a new node @elem as the previous sibling of @cur
merging adjacent TEXT nodes (@elem may be freed) If the new
node was already inserted in a document it is first
unlinked from its existing context. If the new node is
ATTRIBUTE, it is added into properties instead of children.
If there is an attribute with equal name, it is first
destroyed. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
if ret is None:raise treeError('xmlAddPrevSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def addPrevSibling(self, elem):
"""Add a new node @elem as the previous sibling of @cur
merging adjacent TEXT nodes (@elem may be freed) If the new
node was already inserted in a document it is first
unlinked from its existing context. If the new node is
ATTRIBUTE, it is added into properties instead of children.
If there is an attribute with equal name, it is first
destroyed. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
if ret is None:raise treeError('xmlAddPrevSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"addPrevSibling",
"(",
"self",
",",
"elem",
")",
":",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddPrevSibling",
"(",
"self",
".",
"_o",
",",
"elem__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddPrevSibling() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Add a new node @elem as the previous sibling of @cur
merging adjacent TEXT nodes (@elem may be freed) If the new
node was already inserted in a document it is first
unlinked from its existing context. If the new node is
ATTRIBUTE, it is added into properties instead of children.
If there is an attribute with equal name, it is first
destroyed. | [
"Add",
"a",
"new",
"node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3126-L3139 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addSibling | def addSibling(self, elem):
"""Add a new element @elem to the list of siblings of @cur
merging adjacent TEXT nodes (@elem may be freed) If the new
element was already inserted in a document it is first
unlinked from its existing context. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlAddSibling(self._o, elem__o)
if ret is None:raise treeError('xmlAddSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def addSibling(self, elem):
"""Add a new element @elem to the list of siblings of @cur
merging adjacent TEXT nodes (@elem may be freed) If the new
element was already inserted in a document it is first
unlinked from its existing context. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlAddSibling(self._o, elem__o)
if ret is None:raise treeError('xmlAddSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"addSibling",
"(",
"self",
",",
"elem",
")",
":",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddSibling",
"(",
"self",
".",
"_o",
",",
"elem__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddSibling() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Add a new element @elem to the list of siblings of @cur
merging adjacent TEXT nodes (@elem may be freed) If the new
element was already inserted in a document it is first
unlinked from its existing context. | [
"Add",
"a",
"new",
"element"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3141-L3151 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.copyNode | def copyNode(self, extended):
"""Do a copy of the node. """
ret = libxml2mod.xmlCopyNode(self._o, extended)
if ret is None:raise treeError('xmlCopyNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def copyNode(self, extended):
"""Do a copy of the node. """
ret = libxml2mod.xmlCopyNode(self._o, extended)
if ret is None:raise treeError('xmlCopyNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"copyNode",
"(",
"self",
",",
"extended",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyNode",
"(",
"self",
".",
"_o",
",",
"extended",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCopyNode() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a copy of the node. | [
"Do",
"a",
"copy",
"of",
"the",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3153-L3158 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.copyNodeList | def copyNodeList(self):
"""Do a recursive copy of the node list. Use
xmlDocCopyNodeList() if possible to ensure string interning. """
ret = libxml2mod.xmlCopyNodeList(self._o)
if ret is None:raise treeError('xmlCopyNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def copyNodeList(self):
"""Do a recursive copy of the node list. Use
xmlDocCopyNodeList() if possible to ensure string interning. """
ret = libxml2mod.xmlCopyNodeList(self._o)
if ret is None:raise treeError('xmlCopyNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"copyNodeList",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyNodeList",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCopyNodeList() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a recursive copy of the node list. Use
xmlDocCopyNodeList() if possible to ensure string interning. | [
"Do",
"a",
"recursive",
"copy",
"of",
"the",
"node",
"list",
".",
"Use",
"xmlDocCopyNodeList",
"()",
"if",
"possible",
"to",
"ensure",
"string",
"interning",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3160-L3166 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.copyProp | def copyProp(self, cur):
"""Do a copy of the attribute. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlCopyProp(self._o, cur__o)
if ret is None:raise treeError('xmlCopyProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def copyProp(self, cur):
"""Do a copy of the attribute. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlCopyProp(self._o, cur__o)
if ret is None:raise treeError('xmlCopyProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"copyProp",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyProp",
"(",
"self",
".",
"_o",
",",
"cur__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCopyProp() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a copy of the attribute. | [
"Do",
"a",
"copy",
"of",
"the",
"attribute",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3168-L3175 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.copyPropList | def copyPropList(self, cur):
"""Do a copy of an attribute list. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
if ret is None:raise treeError('xmlCopyPropList() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def copyPropList(self, cur):
"""Do a copy of an attribute list. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
if ret is None:raise treeError('xmlCopyPropList() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"copyPropList",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyPropList",
"(",
"self",
".",
"_o",
",",
"cur__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCopyPropList() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a copy of an attribute list. | [
"Do",
"a",
"copy",
"of",
"an",
"attribute",
"list",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3177-L3184 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.docCopyNode | def docCopyNode(self, doc, extended):
"""Do a copy of the node to a given document. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
if ret is None:raise treeError('xmlDocCopyNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def docCopyNode(self, doc, extended):
"""Do a copy of the node to a given document. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
if ret is None:raise treeError('xmlDocCopyNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"docCopyNode",
"(",
"self",
",",
"doc",
",",
"extended",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlDocCopyNode",
"(",
"self",
".",
"_o",
",",
"doc__o",
",",
"extended",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlDocCopyNode() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a copy of the node to a given document. | [
"Do",
"a",
"copy",
"of",
"the",
"node",
"to",
"a",
"given",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3186-L3193 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.docCopyNodeList | def docCopyNodeList(self, doc):
"""Do a recursive copy of the node list. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
if ret is None:raise treeError('xmlDocCopyNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def docCopyNodeList(self, doc):
"""Do a recursive copy of the node list. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
if ret is None:raise treeError('xmlDocCopyNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"docCopyNodeList",
"(",
"self",
",",
"doc",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlDocCopyNodeList",
"(",
"doc__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlDocCopyNodeList() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a recursive copy of the node list. | [
"Do",
"a",
"recursive",
"copy",
"of",
"the",
"node",
"list",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3195-L3202 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.docSetRootElement | def docSetRootElement(self, doc):
"""Set the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | python | def docSetRootElement(self, doc):
"""Set the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"docSetRootElement",
"(",
"self",
",",
"doc",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlDocSetRootElement",
"(",
"doc__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Set the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). | [
"Set",
"the",
"root",
"element",
"of",
"the",
"document",
"(",
"doc",
"-",
">",
"children",
"is",
"a",
"list",
"containing",
"possibly",
"comments",
"PIs",
"etc",
"...",
")",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3204-L3212 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.firstElementChild | def firstElementChild(self):
"""Finds the first child node of that element which is a
Element node Note the handling of entities references is
different than in the W3C DOM element traversal spec since
we don't have back reference from entities content to
entities references. """
ret = libxml2mod.xmlFirstElementChild(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | python | def firstElementChild(self):
"""Finds the first child node of that element which is a
Element node Note the handling of entities references is
different than in the W3C DOM element traversal spec since
we don't have back reference from entities content to
entities references. """
ret = libxml2mod.xmlFirstElementChild(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"firstElementChild",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlFirstElementChild",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Finds the first child node of that element which is a
Element node Note the handling of entities references is
different than in the W3C DOM element traversal spec since
we don't have back reference from entities content to
entities references. | [
"Finds",
"the",
"first",
"child",
"node",
"of",
"that",
"element",
"which",
"is",
"a",
"Element",
"node",
"Note",
"the",
"handling",
"of",
"entities",
"references",
"is",
"different",
"than",
"in",
"the",
"W3C",
"DOM",
"element",
"traversal",
"spec",
"since",
"we",
"don",
"t",
"have",
"back",
"reference",
"from",
"entities",
"content",
"to",
"entities",
"references",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3214-L3223 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.getBase | def getBase(self, doc):
"""Searches for the BASE URL. The code should work on both XML
and HTML document even if base mechanisms are completely
different. It returns the base as defined in RFC 2396
sections 5.1.1. Base URI within Document Content and 5.1.2.
Base URI from the Encapsulating Entity However it does not
return the document base (5.1.3), use doc->URL in this case """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
return ret | python | def getBase(self, doc):
"""Searches for the BASE URL. The code should work on both XML
and HTML document even if base mechanisms are completely
different. It returns the base as defined in RFC 2396
sections 5.1.1. Base URI within Document Content and 5.1.2.
Base URI from the Encapsulating Entity However it does not
return the document base (5.1.3), use doc->URL in this case """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
return ret | [
"def",
"getBase",
"(",
"self",
",",
"doc",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeGetBase",
"(",
"doc__o",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Searches for the BASE URL. The code should work on both XML
and HTML document even if base mechanisms are completely
different. It returns the base as defined in RFC 2396
sections 5.1.1. Base URI within Document Content and 5.1.2.
Base URI from the Encapsulating Entity However it does not
return the document base (5.1.3), use doc->URL in this case | [
"Searches",
"for",
"the",
"BASE",
"URL",
".",
"The",
"code",
"should",
"work",
"on",
"both",
"XML",
"and",
"HTML",
"document",
"even",
"if",
"base",
"mechanisms",
"are",
"completely",
"different",
".",
"It",
"returns",
"the",
"base",
"as",
"defined",
"in",
"RFC",
"2396",
"sections",
"5",
".",
"1",
".",
"1",
".",
"Base",
"URI",
"within",
"Document",
"Content",
"and",
"5",
".",
"1",
".",
"2",
".",
"Base",
"URI",
"from",
"the",
"Encapsulating",
"Entity",
"However",
"it",
"does",
"not",
"return",
"the",
"document",
"base",
"(",
"5",
".",
"1",
".",
"3",
")",
"use",
"doc",
"-",
">",
"URL",
"in",
"this",
"case"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3236-L3246 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.hasNsProp | def hasNsProp(self, name, nameSpace):
"""Search for an attribute associated to a node This attribute
has to be anchored in the namespace specified. This does
the entity substitution. This function looks in DTD
attribute declaration for #FIXED or default declaration
values unless DTD use has been turned off. Note that a
namespace of None indicates to use the default namespace. """
ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
if ret is None:return None
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def hasNsProp(self, name, nameSpace):
"""Search for an attribute associated to a node This attribute
has to be anchored in the namespace specified. This does
the entity substitution. This function looks in DTD
attribute declaration for #FIXED or default declaration
values unless DTD use has been turned off. Note that a
namespace of None indicates to use the default namespace. """
ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
if ret is None:return None
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"hasNsProp",
"(",
"self",
",",
"name",
",",
"nameSpace",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlHasNsProp",
"(",
"self",
".",
"_o",
",",
"name",
",",
"nameSpace",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Search for an attribute associated to a node This attribute
has to be anchored in the namespace specified. This does
the entity substitution. This function looks in DTD
attribute declaration for #FIXED or default declaration
values unless DTD use has been turned off. Note that a
namespace of None indicates to use the default namespace. | [
"Search",
"for",
"an",
"attribute",
"associated",
"to",
"a",
"node",
"This",
"attribute",
"has",
"to",
"be",
"anchored",
"in",
"the",
"namespace",
"specified",
".",
"This",
"does",
"the",
"entity",
"substitution",
".",
"This",
"function",
"looks",
"in",
"DTD",
"attribute",
"declaration",
"for",
"#FIXED",
"or",
"default",
"declaration",
"values",
"unless",
"DTD",
"use",
"has",
"been",
"turned",
"off",
".",
"Note",
"that",
"a",
"namespace",
"of",
"None",
"indicates",
"to",
"use",
"the",
"default",
"namespace",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3270-L3280 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.hasProp | def hasProp(self, name):
"""Search an attribute associated to a node This function also
looks in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. """
ret = libxml2mod.xmlHasProp(self._o, name)
if ret is None:return None
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def hasProp(self, name):
"""Search an attribute associated to a node This function also
looks in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. """
ret = libxml2mod.xmlHasProp(self._o, name)
if ret is None:return None
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"hasProp",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlHasProp",
"(",
"self",
".",
"_o",
",",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Search an attribute associated to a node This function also
looks in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. | [
"Search",
"an",
"attribute",
"associated",
"to",
"a",
"node",
"This",
"function",
"also",
"looks",
"in",
"DTD",
"attribute",
"declaration",
"for",
"#FIXED",
"or",
"default",
"declaration",
"values",
"unless",
"DTD",
"use",
"has",
"been",
"turned",
"off",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3282-L3289 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.lastChild | def lastChild(self):
"""Search the last child of a node. """
ret = libxml2mod.xmlGetLastChild(self._o)
if ret is None:raise treeError('xmlGetLastChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def lastChild(self):
"""Search the last child of a node. """
ret = libxml2mod.xmlGetLastChild(self._o)
if ret is None:raise treeError('xmlGetLastChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"lastChild",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetLastChild",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetLastChild() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Search the last child of a node. | [
"Search",
"the",
"last",
"child",
"of",
"a",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3302-L3307 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.lastElementChild | def lastElementChild(self):
"""Finds the last child node of that element which is a
Element node Note the handling of entities references is
different than in the W3C DOM element traversal spec since
we don't have back reference from entities content to
entities references. """
ret = libxml2mod.xmlLastElementChild(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | python | def lastElementChild(self):
"""Finds the last child node of that element which is a
Element node Note the handling of entities references is
different than in the W3C DOM element traversal spec since
we don't have back reference from entities content to
entities references. """
ret = libxml2mod.xmlLastElementChild(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"lastElementChild",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlLastElementChild",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Finds the last child node of that element which is a
Element node Note the handling of entities references is
different than in the W3C DOM element traversal spec since
we don't have back reference from entities content to
entities references. | [
"Finds",
"the",
"last",
"child",
"node",
"of",
"that",
"element",
"which",
"is",
"a",
"Element",
"node",
"Note",
"the",
"handling",
"of",
"entities",
"references",
"is",
"different",
"than",
"in",
"the",
"W3C",
"DOM",
"element",
"traversal",
"spec",
"since",
"we",
"don",
"t",
"have",
"back",
"reference",
"from",
"entities",
"content",
"to",
"entities",
"references",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3309-L3318 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.listGetRawString | def listGetRawString(self, doc, inLine):
"""Builds the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs, contrary to
xmlNodeListGetString() this function doesn't do any
character encoding handling. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
return ret | python | def listGetRawString(self, doc, inLine):
"""Builds the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs, contrary to
xmlNodeListGetString() this function doesn't do any
character encoding handling. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
return ret | [
"def",
"listGetRawString",
"(",
"self",
",",
"doc",
",",
"inLine",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeListGetRawString",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"inLine",
")",
"return",
"ret"
] | Builds the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs, contrary to
xmlNodeListGetString() this function doesn't do any
character encoding handling. | [
"Builds",
"the",
"string",
"equivalent",
"to",
"the",
"text",
"contained",
"in",
"the",
"Node",
"list",
"made",
"of",
"TEXTs",
"and",
"ENTITY_REFs",
"contrary",
"to",
"xmlNodeListGetString",
"()",
"this",
"function",
"doesn",
"t",
"do",
"any",
"character",
"encoding",
"handling",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3327-L3335 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.listGetString | def listGetString(self, doc, inLine):
"""Build the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
return ret | python | def listGetString(self, doc, inLine):
"""Build the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
return ret | [
"def",
"listGetString",
"(",
"self",
",",
"doc",
",",
"inLine",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeListGetString",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"inLine",
")",
"return",
"ret"
] | Build the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs | [
"Build",
"the",
"string",
"equivalent",
"to",
"the",
"text",
"contained",
"in",
"the",
"Node",
"list",
"made",
"of",
"TEXTs",
"and",
"ENTITY_REFs"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3337-L3343 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.newChild | def newChild(self, ns, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child list containing the TEXTs and ENTITY_REFs node will
be created. NOTE: @content is supposed to be a piece of XML
CDATA, so it allows entity references. XML special chars
must be escaped first by using
xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
be used. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newChild(self, ns, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child list containing the TEXTs and ENTITY_REFs node will
be created. NOTE: @content is supposed to be a piece of XML
CDATA, so it allows entity references. XML special chars
must be escaped first by using
xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
be used. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newChild",
"(",
"self",
",",
"ns",
",",
"name",
",",
"content",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewChild",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewChild() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child list containing the TEXTs and ENTITY_REFs node will
be created. NOTE: @content is supposed to be a piece of XML
CDATA, so it allows entity references. XML special chars
must be escaped first by using
xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
be used. | [
"Creation",
"of",
"a",
"new",
"child",
"element",
"added",
"at",
"the",
"end",
"of"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3345-L3361 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.newNs | def newNs(self, href, prefix):
"""Creation of a new Namespace. This function will refuse to
create a namespace with a similar prefix than an existing
one present on this node. We use href==None in the case of
an element creation where the namespace was not defined. """
ret = libxml2mod.xmlNewNs(self._o, href, prefix)
if ret is None:raise treeError('xmlNewNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | python | def newNs(self, href, prefix):
"""Creation of a new Namespace. This function will refuse to
create a namespace with a similar prefix than an existing
one present on this node. We use href==None in the case of
an element creation where the namespace was not defined. """
ret = libxml2mod.xmlNewNs(self._o, href, prefix)
if ret is None:raise treeError('xmlNewNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"newNs",
"(",
"self",
",",
"href",
",",
"prefix",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewNs",
"(",
"self",
".",
"_o",
",",
"href",
",",
"prefix",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewNs() failed'",
")",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new Namespace. This function will refuse to
create a namespace with a similar prefix than an existing
one present on this node. We use href==None in the case of
an element creation where the namespace was not defined. | [
"Creation",
"of",
"a",
"new",
"Namespace",
".",
"This",
"function",
"will",
"refuse",
"to",
"create",
"a",
"namespace",
"with",
"a",
"similar",
"prefix",
"than",
"an",
"existing",
"one",
"present",
"on",
"this",
"node",
".",
"We",
"use",
"href",
"==",
"None",
"in",
"the",
"case",
"of",
"an",
"element",
"creation",
"where",
"the",
"namespace",
"was",
"not",
"defined",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3363-L3371 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.newNsProp | def newNsProp(self, ns, name, value):
"""Create a new property tagged with a namespace and carried
by a node. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
if ret is None:raise treeError('xmlNewNsProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def newNsProp(self, ns, name, value):
"""Create a new property tagged with a namespace and carried
by a node. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
if ret is None:raise treeError('xmlNewNsProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"newNsProp",
"(",
"self",
",",
"ns",
",",
"name",
",",
"value",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewNsProp",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewNsProp() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create a new property tagged with a namespace and carried
by a node. | [
"Create",
"a",
"new",
"property",
"tagged",
"with",
"a",
"namespace",
"and",
"carried",
"by",
"a",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3373-L3381 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.newNsPropEatName | def newNsPropEatName(self, ns, name, value):
"""Create a new property tagged with a namespace and carried
by a node. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
if ret is None:raise treeError('xmlNewNsPropEatName() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def newNsPropEatName(self, ns, name, value):
"""Create a new property tagged with a namespace and carried
by a node. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
if ret is None:raise treeError('xmlNewNsPropEatName() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"newNsPropEatName",
"(",
"self",
",",
"ns",
",",
"name",
",",
"value",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewNsPropEatName",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewNsPropEatName() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create a new property tagged with a namespace and carried
by a node. | [
"Create",
"a",
"new",
"property",
"tagged",
"with",
"a",
"namespace",
"and",
"carried",
"by",
"a",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3383-L3391 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.newProp | def newProp(self, name, value):
"""Create a new property carried by a node. """
ret = libxml2mod.xmlNewProp(self._o, name, value)
if ret is None:raise treeError('xmlNewProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def newProp(self, name, value):
"""Create a new property carried by a node. """
ret = libxml2mod.xmlNewProp(self._o, name, value)
if ret is None:raise treeError('xmlNewProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"newProp",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewProp",
"(",
"self",
".",
"_o",
",",
"name",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewProp() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create a new property carried by a node. | [
"Create",
"a",
"new",
"property",
"carried",
"by",
"a",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3393-L3398 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.newTextChild | def newTextChild(self, ns, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child TEXT node will be created containing the string
@content. NOTE: Use xmlNewChild() if @content will contain
entities that need to be preserved. Use this function,
xmlNewTextChild(), if you need to ensure that reserved XML
chars that might appear in @content, such as the ampersand,
greater-than or less-than signs, are automatically replaced
by their XML escaped entity representations. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewTextChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newTextChild(self, ns, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child TEXT node will be created containing the string
@content. NOTE: Use xmlNewChild() if @content will contain
entities that need to be preserved. Use this function,
xmlNewTextChild(), if you need to ensure that reserved XML
chars that might appear in @content, such as the ampersand,
greater-than or less-than signs, are automatically replaced
by their XML escaped entity representations. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewTextChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newTextChild",
"(",
"self",
",",
"ns",
",",
"name",
",",
"content",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewTextChild",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewTextChild() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child TEXT node will be created containing the string
@content. NOTE: Use xmlNewChild() if @content will contain
entities that need to be preserved. Use this function,
xmlNewTextChild(), if you need to ensure that reserved XML
chars that might appear in @content, such as the ampersand,
greater-than or less-than signs, are automatically replaced
by their XML escaped entity representations. | [
"Creation",
"of",
"a",
"new",
"child",
"element",
"added",
"at",
"the",
"end",
"of"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3400-L3417 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.nextElementSibling | def nextElementSibling(self):
"""Finds the first closest next sibling of the node which is
an element node. Note the handling of entities references
is different than in the W3C DOM element traversal spec
since we don't have back reference from entities content to
entities references. """
ret = libxml2mod.xmlNextElementSibling(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | python | def nextElementSibling(self):
"""Finds the first closest next sibling of the node which is
an element node. Note the handling of entities references
is different than in the W3C DOM element traversal spec
since we don't have back reference from entities content to
entities references. """
ret = libxml2mod.xmlNextElementSibling(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"nextElementSibling",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNextElementSibling",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Finds the first closest next sibling of the node which is
an element node. Note the handling of entities references
is different than in the W3C DOM element traversal spec
since we don't have back reference from entities content to
entities references. | [
"Finds",
"the",
"first",
"closest",
"next",
"sibling",
"of",
"the",
"node",
"which",
"is",
"an",
"element",
"node",
".",
"Note",
"the",
"handling",
"of",
"entities",
"references",
"is",
"different",
"than",
"in",
"the",
"W3C",
"DOM",
"element",
"traversal",
"spec",
"since",
"we",
"don",
"t",
"have",
"back",
"reference",
"from",
"entities",
"content",
"to",
"entities",
"references",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3419-L3428 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.noNsProp | def noNsProp(self, name):
"""Search and get the value of an attribute associated to a
node This does the entity substitution. This function looks
in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. This
function is similar to xmlGetProp except it will accept
only an attribute in no namespace. """
ret = libxml2mod.xmlGetNoNsProp(self._o, name)
return ret | python | def noNsProp(self, name):
"""Search and get the value of an attribute associated to a
node This does the entity substitution. This function looks
in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. This
function is similar to xmlGetProp except it will accept
only an attribute in no namespace. """
ret = libxml2mod.xmlGetNoNsProp(self._o, name)
return ret | [
"def",
"noNsProp",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetNoNsProp",
"(",
"self",
".",
"_o",
",",
"name",
")",
"return",
"ret"
] | Search and get the value of an attribute associated to a
node This does the entity substitution. This function looks
in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. This
function is similar to xmlGetProp except it will accept
only an attribute in no namespace. | [
"Search",
"and",
"get",
"the",
"value",
"of",
"an",
"attribute",
"associated",
"to",
"a",
"node",
"This",
"does",
"the",
"entity",
"substitution",
".",
"This",
"function",
"looks",
"in",
"DTD",
"attribute",
"declaration",
"for",
"#FIXED",
"or",
"default",
"declaration",
"values",
"unless",
"DTD",
"use",
"has",
"been",
"turned",
"off",
".",
"This",
"function",
"is",
"similar",
"to",
"xmlGetProp",
"except",
"it",
"will",
"accept",
"only",
"an",
"attribute",
"in",
"no",
"namespace",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3430-L3438 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.nsProp | def nsProp(self, name, nameSpace):
"""Search and get the value of an attribute associated to a
node This attribute has to be anchored in the namespace
specified. This does the entity substitution. This function
looks in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. """
ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
return ret | python | def nsProp(self, name, nameSpace):
"""Search and get the value of an attribute associated to a
node This attribute has to be anchored in the namespace
specified. This does the entity substitution. This function
looks in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. """
ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
return ret | [
"def",
"nsProp",
"(",
"self",
",",
"name",
",",
"nameSpace",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetNsProp",
"(",
"self",
".",
"_o",
",",
"name",
",",
"nameSpace",
")",
"return",
"ret"
] | Search and get the value of an attribute associated to a
node This attribute has to be anchored in the namespace
specified. This does the entity substitution. This function
looks in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off. | [
"Search",
"and",
"get",
"the",
"value",
"of",
"an",
"attribute",
"associated",
"to",
"a",
"node",
"This",
"attribute",
"has",
"to",
"be",
"anchored",
"in",
"the",
"namespace",
"specified",
".",
"This",
"does",
"the",
"entity",
"substitution",
".",
"This",
"function",
"looks",
"in",
"DTD",
"attribute",
"declaration",
"for",
"#FIXED",
"or",
"default",
"declaration",
"values",
"unless",
"DTD",
"use",
"has",
"been",
"turned",
"off",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3445-L3452 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.previousElementSibling | def previousElementSibling(self):
"""Finds the first closest previous sibling of the node which
is an element node. Note the handling of entities
references is different than in the W3C DOM element
traversal spec since we don't have back reference from
entities content to entities references. """
ret = libxml2mod.xmlPreviousElementSibling(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | python | def previousElementSibling(self):
"""Finds the first closest previous sibling of the node which
is an element node. Note the handling of entities
references is different than in the W3C DOM element
traversal spec since we don't have back reference from
entities content to entities references. """
ret = libxml2mod.xmlPreviousElementSibling(self._o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"previousElementSibling",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlPreviousElementSibling",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Finds the first closest previous sibling of the node which
is an element node. Note the handling of entities
references is different than in the W3C DOM element
traversal spec since we don't have back reference from
entities content to entities references. | [
"Finds",
"the",
"first",
"closest",
"previous",
"sibling",
"of",
"the",
"node",
"which",
"is",
"an",
"element",
"node",
".",
"Note",
"the",
"handling",
"of",
"entities",
"references",
"is",
"different",
"than",
"in",
"the",
"W3C",
"DOM",
"element",
"traversal",
"spec",
"since",
"we",
"don",
"t",
"have",
"back",
"reference",
"from",
"entities",
"content",
"to",
"entities",
"references",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3454-L3463 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.prop | def prop(self, name):
"""Search and get the value of an attribute associated to a
node This does the entity substitution. This function looks
in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off.
NOTE: this function acts independently of namespaces
associated to the attribute. Use xmlGetNsProp() or
xmlGetNoNsProp() for namespace aware processing. """
ret = libxml2mod.xmlGetProp(self._o, name)
return ret | python | def prop(self, name):
"""Search and get the value of an attribute associated to a
node This does the entity substitution. This function looks
in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off.
NOTE: this function acts independently of namespaces
associated to the attribute. Use xmlGetNsProp() or
xmlGetNoNsProp() for namespace aware processing. """
ret = libxml2mod.xmlGetProp(self._o, name)
return ret | [
"def",
"prop",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetProp",
"(",
"self",
".",
"_o",
",",
"name",
")",
"return",
"ret"
] | Search and get the value of an attribute associated to a
node This does the entity substitution. This function looks
in DTD attribute declaration for #FIXED or default
declaration values unless DTD use has been turned off.
NOTE: this function acts independently of namespaces
associated to the attribute. Use xmlGetNsProp() or
xmlGetNoNsProp() for namespace aware processing. | [
"Search",
"and",
"get",
"the",
"value",
"of",
"an",
"attribute",
"associated",
"to",
"a",
"node",
"This",
"does",
"the",
"entity",
"substitution",
".",
"This",
"function",
"looks",
"in",
"DTD",
"attribute",
"declaration",
"for",
"#FIXED",
"or",
"default",
"declaration",
"values",
"unless",
"DTD",
"use",
"has",
"been",
"turned",
"off",
".",
"NOTE",
":",
"this",
"function",
"acts",
"independently",
"of",
"namespaces",
"associated",
"to",
"the",
"attribute",
".",
"Use",
"xmlGetNsProp",
"()",
"or",
"xmlGetNoNsProp",
"()",
"for",
"namespace",
"aware",
"processing",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3465-L3474 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.reconciliateNs | def reconciliateNs(self, doc):
"""This function checks that all the namespaces declared
within the given tree are properly declared. This is needed
for example after Copy or Cut and then paste operations.
The subtree may still hold pointers to namespace
declarations outside the subtree or invalid/masked. As much
as possible the function try to reuse the existing
namespaces found in the new environment. If not possible
the new namespaces are redeclared on @tree at the top of
the given subtree. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
return ret | python | def reconciliateNs(self, doc):
"""This function checks that all the namespaces declared
within the given tree are properly declared. This is needed
for example after Copy or Cut and then paste operations.
The subtree may still hold pointers to namespace
declarations outside the subtree or invalid/masked. As much
as possible the function try to reuse the existing
namespaces found in the new environment. If not possible
the new namespaces are redeclared on @tree at the top of
the given subtree. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
return ret | [
"def",
"reconciliateNs",
"(",
"self",
",",
"doc",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlReconciliateNs",
"(",
"doc__o",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | This function checks that all the namespaces declared
within the given tree are properly declared. This is needed
for example after Copy or Cut and then paste operations.
The subtree may still hold pointers to namespace
declarations outside the subtree or invalid/masked. As much
as possible the function try to reuse the existing
namespaces found in the new environment. If not possible
the new namespaces are redeclared on @tree at the top of
the given subtree. | [
"This",
"function",
"checks",
"that",
"all",
"the",
"namespaces",
"declared",
"within",
"the",
"given",
"tree",
"are",
"properly",
"declared",
".",
"This",
"is",
"needed",
"for",
"example",
"after",
"Copy",
"or",
"Cut",
"and",
"then",
"paste",
"operations",
".",
"The",
"subtree",
"may",
"still",
"hold",
"pointers",
"to",
"namespace",
"declarations",
"outside",
"the",
"subtree",
"or",
"invalid",
"/",
"masked",
".",
"As",
"much",
"as",
"possible",
"the",
"function",
"try",
"to",
"reuse",
"the",
"existing",
"namespaces",
"found",
"in",
"the",
"new",
"environment",
".",
"If",
"not",
"possible",
"the",
"new",
"namespaces",
"are",
"redeclared",
"on"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3476-L3489 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.replaceNode | def replaceNode(self, cur):
"""Unlink the old node from its current context, prune the new
one at the same place. If @cur was already inserted in a
document it is first unlinked from its existing context. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
if ret is None:raise treeError('xmlReplaceNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def replaceNode(self, cur):
"""Unlink the old node from its current context, prune the new
one at the same place. If @cur was already inserted in a
document it is first unlinked from its existing context. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
if ret is None:raise treeError('xmlReplaceNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"replaceNode",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlReplaceNode",
"(",
"self",
".",
"_o",
",",
"cur__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlReplaceNode() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Unlink the old node from its current context, prune the new
one at the same place. If @cur was already inserted in a
document it is first unlinked from its existing context. | [
"Unlink",
"the",
"old",
"node",
"from",
"its",
"current",
"context",
"prune",
"the",
"new",
"one",
"at",
"the",
"same",
"place",
".",
"If"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3491-L3500 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.searchNs | def searchNs(self, doc, nameSpace):
"""Search a Ns registered under a given name space for a
document. recurse on the parents until it finds the defined
namespace or return None otherwise. @nameSpace can be None,
this is a search for the default namespace. We don't allow
to cross entities boundaries. If you don't declare the
namespace within those you will be in troubles !!! A
warning is generated to cover this case. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
if ret is None:raise treeError('xmlSearchNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | python | def searchNs(self, doc, nameSpace):
"""Search a Ns registered under a given name space for a
document. recurse on the parents until it finds the defined
namespace or return None otherwise. @nameSpace can be None,
this is a search for the default namespace. We don't allow
to cross entities boundaries. If you don't declare the
namespace within those you will be in troubles !!! A
warning is generated to cover this case. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
if ret is None:raise treeError('xmlSearchNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"searchNs",
"(",
"self",
",",
"doc",
",",
"nameSpace",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSearchNs",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"nameSpace",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlSearchNs() failed'",
")",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Search a Ns registered under a given name space for a
document. recurse on the parents until it finds the defined
namespace or return None otherwise. @nameSpace can be None,
this is a search for the default namespace. We don't allow
to cross entities boundaries. If you don't declare the
namespace within those you will be in troubles !!! A
warning is generated to cover this case. | [
"Search",
"a",
"Ns",
"registered",
"under",
"a",
"given",
"name",
"space",
"for",
"a",
"document",
".",
"recurse",
"on",
"the",
"parents",
"until",
"it",
"finds",
"the",
"defined",
"namespace",
"or",
"return",
"None",
"otherwise",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3502-L3515 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.searchNsByHref | def searchNsByHref(self, doc, href):
"""Search a Ns aliasing a given URI. Recurse on the parents
until it finds the defined namespace or return None
otherwise. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
if ret is None:raise treeError('xmlSearchNsByHref() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | python | def searchNsByHref(self, doc, href):
"""Search a Ns aliasing a given URI. Recurse on the parents
until it finds the defined namespace or return None
otherwise. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
if ret is None:raise treeError('xmlSearchNsByHref() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"searchNsByHref",
"(",
"self",
",",
"doc",
",",
"href",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSearchNsByHref",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"href",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlSearchNsByHref() failed'",
")",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Search a Ns aliasing a given URI. Recurse on the parents
until it finds the defined namespace or return None
otherwise. | [
"Search",
"a",
"Ns",
"aliasing",
"a",
"given",
"URI",
".",
"Recurse",
"on",
"the",
"parents",
"until",
"it",
"finds",
"the",
"defined",
"namespace",
"or",
"return",
"None",
"otherwise",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3517-L3526 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.setContentLen | def setContentLen(self, content, len):
"""Replace the content of a node. NOTE: @content is supposed
to be a piece of XML CDATA, so it allows entity references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
libxml2mod.xmlNodeSetContentLen(self._o, content, len) | python | def setContentLen(self, content, len):
"""Replace the content of a node. NOTE: @content is supposed
to be a piece of XML CDATA, so it allows entity references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
libxml2mod.xmlNodeSetContentLen(self._o, content, len) | [
"def",
"setContentLen",
"(",
"self",
",",
"content",
",",
"len",
")",
":",
"libxml2mod",
".",
"xmlNodeSetContentLen",
"(",
"self",
".",
"_o",
",",
"content",
",",
"len",
")"
] | Replace the content of a node. NOTE: @content is supposed
to be a piece of XML CDATA, so it allows entity references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). | [
"Replace",
"the",
"content",
"of",
"a",
"node",
".",
"NOTE",
":"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3540-L3545 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.setListDoc | def setListDoc(self, doc):
"""update all nodes in the list to point to the right document """
if doc is None: doc__o = None
else: doc__o = doc._o
libxml2mod.xmlSetListDoc(self._o, doc__o) | python | def setListDoc(self, doc):
"""update all nodes in the list to point to the right document """
if doc is None: doc__o = None
else: doc__o = doc._o
libxml2mod.xmlSetListDoc(self._o, doc__o) | [
"def",
"setListDoc",
"(",
"self",
",",
"doc",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"libxml2mod",
".",
"xmlSetListDoc",
"(",
"self",
".",
"_o",
",",
"doc__o",
")"
] | update all nodes in the list to point to the right document | [
"update",
"all",
"nodes",
"in",
"the",
"list",
"to",
"point",
"to",
"the",
"right",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3552-L3556 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.setNs | def setNs(self, ns):
"""Associate a namespace to a node, a posteriori. """
if ns is None: ns__o = None
else: ns__o = ns._o
libxml2mod.xmlSetNs(self._o, ns__o) | python | def setNs(self, ns):
"""Associate a namespace to a node, a posteriori. """
if ns is None: ns__o = None
else: ns__o = ns._o
libxml2mod.xmlSetNs(self._o, ns__o) | [
"def",
"setNs",
"(",
"self",
",",
"ns",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"libxml2mod",
".",
"xmlSetNs",
"(",
"self",
".",
"_o",
",",
"ns__o",
")"
] | Associate a namespace to a node, a posteriori. | [
"Associate",
"a",
"namespace",
"to",
"a",
"node",
"a",
"posteriori",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3562-L3566 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.setNsProp | def setNsProp(self, ns, name, value):
"""Set (or reset) an attribute carried by a node. The ns
structure must be in scope, this is not checked """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
if ret is None:raise treeError('xmlSetNsProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def setNsProp(self, ns, name, value):
"""Set (or reset) an attribute carried by a node. The ns
structure must be in scope, this is not checked """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
if ret is None:raise treeError('xmlSetNsProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"setNsProp",
"(",
"self",
",",
"ns",
",",
"name",
",",
"value",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSetNsProp",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlSetNsProp() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Set (or reset) an attribute carried by a node. The ns
structure must be in scope, this is not checked | [
"Set",
"(",
"or",
"reset",
")",
"an",
"attribute",
"carried",
"by",
"a",
"node",
".",
"The",
"ns",
"structure",
"must",
"be",
"in",
"scope",
"this",
"is",
"not",
"checked"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3568-L3576 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.setProp | def setProp(self, name, value):
"""Set (or reset) an attribute carried by a node. If @name has
a prefix, then the corresponding namespace-binding will be
used, if in scope; it is an error it there's no such
ns-binding for the prefix in scope. """
ret = libxml2mod.xmlSetProp(self._o, name, value)
if ret is None:raise treeError('xmlSetProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def setProp(self, name, value):
"""Set (or reset) an attribute carried by a node. If @name has
a prefix, then the corresponding namespace-binding will be
used, if in scope; it is an error it there's no such
ns-binding for the prefix in scope. """
ret = libxml2mod.xmlSetProp(self._o, name, value)
if ret is None:raise treeError('xmlSetProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"setProp",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSetProp",
"(",
"self",
".",
"_o",
",",
"name",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlSetProp() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Set (or reset) an attribute carried by a node. If @name has
a prefix, then the corresponding namespace-binding will be
used, if in scope; it is an error it there's no such
ns-binding for the prefix in scope. | [
"Set",
"(",
"or",
"reset",
")",
"an",
"attribute",
"carried",
"by",
"a",
"node",
".",
"If"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3578-L3586 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.setTreeDoc | def setTreeDoc(self, doc):
"""update all nodes under the tree to point to the right
document """
if doc is None: doc__o = None
else: doc__o = doc._o
libxml2mod.xmlSetTreeDoc(self._o, doc__o) | python | def setTreeDoc(self, doc):
"""update all nodes under the tree to point to the right
document """
if doc is None: doc__o = None
else: doc__o = doc._o
libxml2mod.xmlSetTreeDoc(self._o, doc__o) | [
"def",
"setTreeDoc",
"(",
"self",
",",
"doc",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"libxml2mod",
".",
"xmlSetTreeDoc",
"(",
"self",
".",
"_o",
",",
"doc__o",
")"
] | update all nodes under the tree to point to the right
document | [
"update",
"all",
"nodes",
"under",
"the",
"tree",
"to",
"point",
"to",
"the",
"right",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3593-L3598 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.textConcat | def textConcat(self, content, len):
"""Concat the given string at the end of the existing node
content """
ret = libxml2mod.xmlTextConcat(self._o, content, len)
return ret | python | def textConcat(self, content, len):
"""Concat the given string at the end of the existing node
content """
ret = libxml2mod.xmlTextConcat(self._o, content, len)
return ret | [
"def",
"textConcat",
"(",
"self",
",",
"content",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlTextConcat",
"(",
"self",
".",
"_o",
",",
"content",
",",
"len",
")",
"return",
"ret"
] | Concat the given string at the end of the existing node
content | [
"Concat",
"the",
"given",
"string",
"at",
"the",
"end",
"of",
"the",
"existing",
"node",
"content"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3600-L3604 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.textMerge | def textMerge(self, second):
"""Merge two text nodes into one """
if second is None: second__o = None
else: second__o = second._o
ret = libxml2mod.xmlTextMerge(self._o, second__o)
if ret is None:raise treeError('xmlTextMerge() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def textMerge(self, second):
"""Merge two text nodes into one """
if second is None: second__o = None
else: second__o = second._o
ret = libxml2mod.xmlTextMerge(self._o, second__o)
if ret is None:raise treeError('xmlTextMerge() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"textMerge",
"(",
"self",
",",
"second",
")",
":",
"if",
"second",
"is",
"None",
":",
"second__o",
"=",
"None",
"else",
":",
"second__o",
"=",
"second",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlTextMerge",
"(",
"self",
".",
"_o",
",",
"second__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlTextMerge() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Merge two text nodes into one | [
"Merge",
"two",
"text",
"nodes",
"into",
"one"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3606-L3613 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.unsetNsProp | def unsetNsProp(self, ns, name):
"""Remove an attribute carried by a node. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
return ret | python | def unsetNsProp(self, ns, name):
"""Remove an attribute carried by a node. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
return ret | [
"def",
"unsetNsProp",
"(",
"self",
",",
"ns",
",",
"name",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlUnsetNsProp",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
")",
"return",
"ret"
] | Remove an attribute carried by a node. | [
"Remove",
"an",
"attribute",
"carried",
"by",
"a",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3623-L3628 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.unsetProp | def unsetProp(self, name):
"""Remove an attribute carried by a node. This handles only
attributes in no namespace. """
ret = libxml2mod.xmlUnsetProp(self._o, name)
return ret | python | def unsetProp(self, name):
"""Remove an attribute carried by a node. This handles only
attributes in no namespace. """
ret = libxml2mod.xmlUnsetProp(self._o, name)
return ret | [
"def",
"unsetProp",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlUnsetProp",
"(",
"self",
".",
"_o",
",",
"name",
")",
"return",
"ret"
] | Remove an attribute carried by a node. This handles only
attributes in no namespace. | [
"Remove",
"an",
"attribute",
"carried",
"by",
"a",
"node",
".",
"This",
"handles",
"only",
"attributes",
"in",
"no",
"namespace",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3630-L3634 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.