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 | xmlNode.isID | def isID(self, doc, attr):
"""Determine whether an attribute is of type ID. In case we
have DTD(s) then this is done if DTD loading has been
requested. In the case of HTML documents parsed with the
HTML parser, then ID detection is done systematically. """
if doc is None: doc__o = None
else: doc__o = doc._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
return ret | python | def isID(self, doc, attr):
"""Determine whether an attribute is of type ID. In case we
have DTD(s) then this is done if DTD loading has been
requested. In the case of HTML documents parsed with the
HTML parser, then ID detection is done systematically. """
if doc is None: doc__o = None
else: doc__o = doc._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
return ret | [
"def",
"isID",
"(",
"self",
",",
"doc",
",",
"attr",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"if",
"attr",
"is",
"None",
":",
"attr__o",
"=",
"None",
"else",
":",
"attr__o",
"=",
"attr",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlIsID",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"attr__o",
")",
"return",
"ret"
] | Determine whether an attribute is of type ID. In case we
have DTD(s) then this is done if DTD loading has been
requested. In the case of HTML documents parsed with the
HTML parser, then ID detection is done systematically. | [
"Determine",
"whether",
"an",
"attribute",
"is",
"of",
"type",
"ID",
".",
"In",
"case",
"we",
"have",
"DTD",
"(",
"s",
")",
"then",
"this",
"is",
"done",
"if",
"DTD",
"loading",
"has",
"been",
"requested",
".",
"In",
"the",
"case",
"of",
"HTML",
"documents",
"parsed",
"with",
"the",
"HTML",
"parser",
"then",
"ID",
"detection",
"is",
"done",
"systematically",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3640-L3650 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.isRef | def isRef(self, doc, attr):
"""Determine whether an attribute is of type Ref. In case we
have DTD(s) then this is simple, otherwise we use an
heuristic: name Ref (upper or lowercase). """
if doc is None: doc__o = None
else: doc__o = doc._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
return ret | python | def isRef(self, doc, attr):
"""Determine whether an attribute is of type Ref. In case we
have DTD(s) then this is simple, otherwise we use an
heuristic: name Ref (upper or lowercase). """
if doc is None: doc__o = None
else: doc__o = doc._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
return ret | [
"def",
"isRef",
"(",
"self",
",",
"doc",
",",
"attr",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"if",
"attr",
"is",
"None",
":",
"attr__o",
"=",
"None",
"else",
":",
"attr__o",
"=",
"attr",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlIsRef",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"attr__o",
")",
"return",
"ret"
] | Determine whether an attribute is of type Ref. In case we
have DTD(s) then this is simple, otherwise we use an
heuristic: name Ref (upper or lowercase). | [
"Determine",
"whether",
"an",
"attribute",
"is",
"of",
"type",
"Ref",
".",
"In",
"case",
"we",
"have",
"DTD",
"(",
"s",
")",
"then",
"this",
"is",
"simple",
"otherwise",
"we",
"use",
"an",
"heuristic",
":",
"name",
"Ref",
"(",
"upper",
"or",
"lowercase",
")",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3652-L3661 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.validNormalizeAttributeValue | def validNormalizeAttributeValue(self, doc, name, value):
"""Does the validation related extra step of the normalization
of attribute values: If the declared value is not CDATA,
then the XML processor must further process the normalized
attribute value by discarding any leading and trailing
space (#x20) characters, and by replacing sequences of
space (#x20) characters by single space (#x20) character. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
return ret | python | def validNormalizeAttributeValue(self, doc, name, value):
"""Does the validation related extra step of the normalization
of attribute values: If the declared value is not CDATA,
then the XML processor must further process the normalized
attribute value by discarding any leading and trailing
space (#x20) characters, and by replacing sequences of
space (#x20) characters by single space (#x20) character. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
return ret | [
"def",
"validNormalizeAttributeValue",
"(",
"self",
",",
"doc",
",",
"name",
",",
"value",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlValidNormalizeAttributeValue",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"name",
",",
"value",
")",
"return",
"ret"
] | Does the validation related extra step of the normalization
of attribute values: If the declared value is not CDATA,
then the XML processor must further process the normalized
attribute value by discarding any leading and trailing
space (#x20) characters, and by replacing sequences of
space (#x20) characters by single space (#x20) character. | [
"Does",
"the",
"validation",
"related",
"extra",
"step",
"of",
"the",
"normalization",
"of",
"attribute",
"values",
":",
"If",
"the",
"declared",
"value",
"is",
"not",
"CDATA",
"then",
"the",
"XML",
"processor",
"must",
"further",
"process",
"the",
"normalized",
"attribute",
"value",
"by",
"discarding",
"any",
"leading",
"and",
"trailing",
"space",
"(",
"#x20",
")",
"characters",
"and",
"by",
"replacing",
"sequences",
"of",
"space",
"(",
"#x20",
")",
"characters",
"by",
"single",
"space",
"(",
"#x20",
")",
"character",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3663-L3673 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xincludeProcessTreeFlags | def xincludeProcessTreeFlags(self, flags):
"""Implement the XInclude substitution for the given subtree """
ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
return ret | python | def xincludeProcessTreeFlags(self, flags):
"""Implement the XInclude substitution for the given subtree """
ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
return ret | [
"def",
"xincludeProcessTreeFlags",
"(",
"self",
",",
"flags",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlXIncludeProcessTreeFlags",
"(",
"self",
".",
"_o",
",",
"flags",
")",
"return",
"ret"
] | Implement the XInclude substitution for the given subtree | [
"Implement",
"the",
"XInclude",
"substitution",
"for",
"the",
"given",
"subtree"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3684-L3687 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.schemaValidateOneElement | def schemaValidateOneElement(self, ctxt):
"""Validate a branch of a tree, starting with the given @elem. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
return ret | python | def schemaValidateOneElement(self, ctxt):
"""Validate a branch of a tree, starting with the given @elem. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
return ret | [
"def",
"schemaValidateOneElement",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSchemaValidateOneElement",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Validate a branch of a tree, starting with the given @elem. | [
"Validate",
"a",
"branch",
"of",
"a",
"tree",
"starting",
"with",
"the",
"given"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3693-L3698 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathCmpNodes | def xpathCmpNodes(self, node2):
"""Compare two nodes w.r.t document order """
if node2 is None: node2__o = None
else: node2__o = node2._o
ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
return ret | python | def xpathCmpNodes(self, node2):
"""Compare two nodes w.r.t document order """
if node2 is None: node2__o = None
else: node2__o = node2._o
ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
return ret | [
"def",
"xpathCmpNodes",
"(",
"self",
",",
"node2",
")",
":",
"if",
"node2",
"is",
"None",
":",
"node2__o",
"=",
"None",
"else",
":",
"node2__o",
"=",
"node2",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathCmpNodes",
"(",
"self",
".",
"_o",
",",
"node2__o",
")",
"return",
"ret"
] | Compare two nodes w.r.t document order | [
"Compare",
"two",
"nodes",
"w",
".",
"r",
".",
"t",
"document",
"order"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3714-L3719 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNodeEval | def xpathNodeEval(self, str, ctx):
"""Evaluate the XPath Location Path in the given context. The
node 'node' is set as the context node. The context node is
not restored. """
if ctx is None: ctx__o = None
else: ctx__o = ctx._o
ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
if ret is None:raise xpathError('xmlXPathNodeEval() failed')
return xpathObjectRet(ret) | python | def xpathNodeEval(self, str, ctx):
"""Evaluate the XPath Location Path in the given context. The
node 'node' is set as the context node. The context node is
not restored. """
if ctx is None: ctx__o = None
else: ctx__o = ctx._o
ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
if ret is None:raise xpathError('xmlXPathNodeEval() failed')
return xpathObjectRet(ret) | [
"def",
"xpathNodeEval",
"(",
"self",
",",
"str",
",",
"ctx",
")",
":",
"if",
"ctx",
"is",
"None",
":",
"ctx__o",
"=",
"None",
"else",
":",
"ctx__o",
"=",
"ctx",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNodeEval",
"(",
"self",
".",
"_o",
",",
"str",
",",
"ctx__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNodeEval() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Evaluate the XPath Location Path in the given context. The
node 'node' is set as the context node. The context node is
not restored. | [
"Evaluate",
"the",
"XPath",
"Location",
"Path",
"in",
"the",
"given",
"context",
".",
"The",
"node",
"node",
"is",
"set",
"as",
"the",
"context",
"node",
".",
"The",
"context",
"node",
"is",
"not",
"restored",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3721-L3729 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNewNodeSet | def xpathNewNodeSet(self):
"""Create a new xmlXPathObjectPtr of type NodeSet and
initialize it with the single Node @val """
ret = libxml2mod.xmlXPathNewNodeSet(self._o)
if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
return xpathObjectRet(ret) | python | def xpathNewNodeSet(self):
"""Create a new xmlXPathObjectPtr of type NodeSet and
initialize it with the single Node @val """
ret = libxml2mod.xmlXPathNewNodeSet(self._o)
if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
return xpathObjectRet(ret) | [
"def",
"xpathNewNodeSet",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNewNodeSet",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNewNodeSet() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Create a new xmlXPathObjectPtr of type NodeSet and
initialize it with the single Node @val | [
"Create",
"a",
"new",
"xmlXPathObjectPtr",
"of",
"type",
"NodeSet",
"and",
"initialize",
"it",
"with",
"the",
"single",
"Node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3735-L3740 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNewValueTree | def xpathNewValueTree(self):
"""Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
and initialize it with the tree root @val """
ret = libxml2mod.xmlXPathNewValueTree(self._o)
if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
return xpathObjectRet(ret) | python | def xpathNewValueTree(self):
"""Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
and initialize it with the tree root @val """
ret = libxml2mod.xmlXPathNewValueTree(self._o)
if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
return xpathObjectRet(ret) | [
"def",
"xpathNewValueTree",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNewValueTree",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNewValueTree() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
and initialize it with the tree root @val | [
"Create",
"a",
"new",
"xmlXPathObjectPtr",
"of",
"type",
"Value",
"Tree",
"(",
"XSLT",
")",
"and",
"initialize",
"it",
"with",
"the",
"tree",
"root"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3742-L3747 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextAncestor | def xpathNextAncestor(self, ctxt):
"""Traversal function for the "ancestor" direction the
ancestor axis contains the ancestors of the context node;
the ancestors of the context node consist of the parent of
context node and the parent's parent and so on; the nodes
are ordered in reverse document order; thus the parent is
the first node on the axis, and the parent's parent is the
second node on the axis """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextAncestor(self, ctxt):
"""Traversal function for the "ancestor" direction the
ancestor axis contains the ancestors of the context node;
the ancestors of the context node consist of the parent of
context node and the parent's parent and so on; the nodes
are ordered in reverse document order; thus the parent is
the first node on the axis, and the parent's parent is the
second node on the axis """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextAncestor",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextAncestor",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextAncestor() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "ancestor" direction the
ancestor axis contains the ancestors of the context node;
the ancestors of the context node consist of the parent of
context node and the parent's parent and so on; the nodes
are ordered in reverse document order; thus the parent is
the first node on the axis, and the parent's parent is the
second node on the axis | [
"Traversal",
"function",
"for",
"the",
"ancestor",
"direction",
"the",
"ancestor",
"axis",
"contains",
"the",
"ancestors",
"of",
"the",
"context",
"node",
";",
"the",
"ancestors",
"of",
"the",
"context",
"node",
"consist",
"of",
"the",
"parent",
"of",
"context",
"node",
"and",
"the",
"parent",
"s",
"parent",
"and",
"so",
"on",
";",
"the",
"nodes",
"are",
"ordered",
"in",
"reverse",
"document",
"order",
";",
"thus",
"the",
"parent",
"is",
"the",
"first",
"node",
"on",
"the",
"axis",
"and",
"the",
"parent",
"s",
"parent",
"is",
"the",
"second",
"node",
"on",
"the",
"axis"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3749-L3762 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextAncestorOrSelf | def xpathNextAncestorOrSelf(self, ctxt):
"""Traversal function for the "ancestor-or-self" direction he
ancestor-or-self axis contains the context node and
ancestors of the context node in reverse document order;
thus the context node is the first node on the axis, and
the context node's parent the second; parent here is
defined the same as with the parent axis. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextAncestorOrSelf(self, ctxt):
"""Traversal function for the "ancestor-or-self" direction he
ancestor-or-self axis contains the context node and
ancestors of the context node in reverse document order;
thus the context node is the first node on the axis, and
the context node's parent the second; parent here is
defined the same as with the parent axis. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextAncestorOrSelf",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextAncestorOrSelf",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextAncestorOrSelf() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "ancestor-or-self" direction he
ancestor-or-self axis contains the context node and
ancestors of the context node in reverse document order;
thus the context node is the first node on the axis, and
the context node's parent the second; parent here is
defined the same as with the parent axis. | [
"Traversal",
"function",
"for",
"the",
"ancestor",
"-",
"or",
"-",
"self",
"direction",
"he",
"ancestor",
"-",
"or",
"-",
"self",
"axis",
"contains",
"the",
"context",
"node",
"and",
"ancestors",
"of",
"the",
"context",
"node",
"in",
"reverse",
"document",
"order",
";",
"thus",
"the",
"context",
"node",
"is",
"the",
"first",
"node",
"on",
"the",
"axis",
"and",
"the",
"context",
"node",
"s",
"parent",
"the",
"second",
";",
"parent",
"here",
"is",
"defined",
"the",
"same",
"as",
"with",
"the",
"parent",
"axis",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3764-L3776 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextAttribute | def xpathNextAttribute(self, ctxt):
"""Traversal function for the "attribute" direction TODO:
support DTD inherited default attributes """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextAttribute(self, ctxt):
"""Traversal function for the "attribute" direction TODO:
support DTD inherited default attributes """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextAttribute",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextAttribute",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextAttribute() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "attribute" direction TODO:
support DTD inherited default attributes | [
"Traversal",
"function",
"for",
"the",
"attribute",
"direction",
"TODO",
":",
"support",
"DTD",
"inherited",
"default",
"attributes"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3778-L3786 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextChild | def xpathNextChild(self, ctxt):
"""Traversal function for the "child" direction The child axis
contains the children of the context node in document order. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextChild(self, ctxt):
"""Traversal function for the "child" direction The child axis
contains the children of the context node in document order. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextChild",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextChild",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextChild() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "child" direction The child axis
contains the children of the context node in document order. | [
"Traversal",
"function",
"for",
"the",
"child",
"direction",
"The",
"child",
"axis",
"contains",
"the",
"children",
"of",
"the",
"context",
"node",
"in",
"document",
"order",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3788-L3796 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextDescendant | def xpathNextDescendant(self, ctxt):
"""Traversal function for the "descendant" direction the
descendant axis contains the descendants of the context
node in document order; a descendant is a child or a child
of a child and so on. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextDescendant(self, ctxt):
"""Traversal function for the "descendant" direction the
descendant axis contains the descendants of the context
node in document order; a descendant is a child or a child
of a child and so on. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextDescendant",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextDescendant",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextDescendant() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "descendant" direction the
descendant axis contains the descendants of the context
node in document order; a descendant is a child or a child
of a child and so on. | [
"Traversal",
"function",
"for",
"the",
"descendant",
"direction",
"the",
"descendant",
"axis",
"contains",
"the",
"descendants",
"of",
"the",
"context",
"node",
"in",
"document",
"order",
";",
"a",
"descendant",
"is",
"a",
"child",
"or",
"a",
"child",
"of",
"a",
"child",
"and",
"so",
"on",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3798-L3808 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextDescendantOrSelf | def xpathNextDescendantOrSelf(self, ctxt):
"""Traversal function for the "descendant-or-self" direction
the descendant-or-self axis contains the context node and
the descendants of the context node in document order; thus
the context node is the first node on the axis, and the
first child of the context node is the second node on the
axis """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextDescendantOrSelf(self, ctxt):
"""Traversal function for the "descendant-or-self" direction
the descendant-or-self axis contains the context node and
the descendants of the context node in document order; thus
the context node is the first node on the axis, and the
first child of the context node is the second node on the
axis """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextDescendantOrSelf",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextDescendantOrSelf",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextDescendantOrSelf() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "descendant-or-self" direction
the descendant-or-self axis contains the context node and
the descendants of the context node in document order; thus
the context node is the first node on the axis, and the
first child of the context node is the second node on the
axis | [
"Traversal",
"function",
"for",
"the",
"descendant",
"-",
"or",
"-",
"self",
"direction",
"the",
"descendant",
"-",
"or",
"-",
"self",
"axis",
"contains",
"the",
"context",
"node",
"and",
"the",
"descendants",
"of",
"the",
"context",
"node",
"in",
"document",
"order",
";",
"thus",
"the",
"context",
"node",
"is",
"the",
"first",
"node",
"on",
"the",
"axis",
"and",
"the",
"first",
"child",
"of",
"the",
"context",
"node",
"is",
"the",
"second",
"node",
"on",
"the",
"axis"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3810-L3822 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextFollowing | def xpathNextFollowing(self, ctxt):
"""Traversal function for the "following" direction The
following axis contains all nodes in the same document as
the context node that are after the context node in
document order, excluding any descendants and excluding
attribute nodes and namespace nodes; the nodes are ordered
in document order """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextFollowing(self, ctxt):
"""Traversal function for the "following" direction The
following axis contains all nodes in the same document as
the context node that are after the context node in
document order, excluding any descendants and excluding
attribute nodes and namespace nodes; the nodes are ordered
in document order """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextFollowing",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextFollowing",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextFollowing() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "following" direction The
following axis contains all nodes in the same document as
the context node that are after the context node in
document order, excluding any descendants and excluding
attribute nodes and namespace nodes; the nodes are ordered
in document order | [
"Traversal",
"function",
"for",
"the",
"following",
"direction",
"The",
"following",
"axis",
"contains",
"all",
"nodes",
"in",
"the",
"same",
"document",
"as",
"the",
"context",
"node",
"that",
"are",
"after",
"the",
"context",
"node",
"in",
"document",
"order",
"excluding",
"any",
"descendants",
"and",
"excluding",
"attribute",
"nodes",
"and",
"namespace",
"nodes",
";",
"the",
"nodes",
"are",
"ordered",
"in",
"document",
"order"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3824-L3836 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextFollowingSibling | def xpathNextFollowingSibling(self, ctxt):
"""Traversal function for the "following-sibling" direction
The following-sibling axis contains the following siblings
of the context node in document order. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextFollowingSibling(self, ctxt):
"""Traversal function for the "following-sibling" direction
The following-sibling axis contains the following siblings
of the context node in document order. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextFollowingSibling",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextFollowingSibling",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextFollowingSibling() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "following-sibling" direction
The following-sibling axis contains the following siblings
of the context node in document order. | [
"Traversal",
"function",
"for",
"the",
"following",
"-",
"sibling",
"direction",
"The",
"following",
"-",
"sibling",
"axis",
"contains",
"the",
"following",
"siblings",
"of",
"the",
"context",
"node",
"in",
"document",
"order",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3838-L3847 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextNamespace | def xpathNextNamespace(self, ctxt):
"""Traversal function for the "namespace" direction the
namespace axis contains the namespace nodes of the context
node; the order of nodes on this axis is
implementation-defined; the axis will be empty unless the
context node is an element We keep the XML namespace node
at the end of the list. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextNamespace(self, ctxt):
"""Traversal function for the "namespace" direction the
namespace axis contains the namespace nodes of the context
node; the order of nodes on this axis is
implementation-defined; the axis will be empty unless the
context node is an element We keep the XML namespace node
at the end of the list. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextNamespace",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextNamespace",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextNamespace() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "namespace" direction the
namespace axis contains the namespace nodes of the context
node; the order of nodes on this axis is
implementation-defined; the axis will be empty unless the
context node is an element We keep the XML namespace node
at the end of the list. | [
"Traversal",
"function",
"for",
"the",
"namespace",
"direction",
"the",
"namespace",
"axis",
"contains",
"the",
"namespace",
"nodes",
"of",
"the",
"context",
"node",
";",
"the",
"order",
"of",
"nodes",
"on",
"this",
"axis",
"is",
"implementation",
"-",
"defined",
";",
"the",
"axis",
"will",
"be",
"empty",
"unless",
"the",
"context",
"node",
"is",
"an",
"element",
"We",
"keep",
"the",
"XML",
"namespace",
"node",
"at",
"the",
"end",
"of",
"the",
"list",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3849-L3861 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextParent | def xpathNextParent(self, ctxt):
"""Traversal function for the "parent" direction The parent
axis contains the parent of the context node, if there is
one. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextParent() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextParent(self, ctxt):
"""Traversal function for the "parent" direction The parent
axis contains the parent of the context node, if there is
one. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextParent() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextParent",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextParent",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextParent() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "parent" direction The parent
axis contains the parent of the context node, if there is
one. | [
"Traversal",
"function",
"for",
"the",
"parent",
"direction",
"The",
"parent",
"axis",
"contains",
"the",
"parent",
"of",
"the",
"context",
"node",
"if",
"there",
"is",
"one",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3863-L3872 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextPreceding | def xpathNextPreceding(self, ctxt):
"""Traversal function for the "preceding" direction the
preceding axis contains all nodes in the same document as
the context node that are before the context node in
document order, excluding any ancestors and excluding
attribute nodes and namespace nodes; the nodes are ordered
in reverse document order """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextPreceding(self, ctxt):
"""Traversal function for the "preceding" direction the
preceding axis contains all nodes in the same document as
the context node that are before the context node in
document order, excluding any ancestors and excluding
attribute nodes and namespace nodes; the nodes are ordered
in reverse document order """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextPreceding",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextPreceding",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextPreceding() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "preceding" direction the
preceding axis contains all nodes in the same document as
the context node that are before the context node in
document order, excluding any ancestors and excluding
attribute nodes and namespace nodes; the nodes are ordered
in reverse document order | [
"Traversal",
"function",
"for",
"the",
"preceding",
"direction",
"the",
"preceding",
"axis",
"contains",
"all",
"nodes",
"in",
"the",
"same",
"document",
"as",
"the",
"context",
"node",
"that",
"are",
"before",
"the",
"context",
"node",
"in",
"document",
"order",
"excluding",
"any",
"ancestors",
"and",
"excluding",
"attribute",
"nodes",
"and",
"namespace",
"nodes",
";",
"the",
"nodes",
"are",
"ordered",
"in",
"reverse",
"document",
"order"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3874-L3886 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextPrecedingSibling | def xpathNextPrecedingSibling(self, ctxt):
"""Traversal function for the "preceding-sibling" direction
The preceding-sibling axis contains the preceding siblings
of the context node in reverse document order; the first
preceding sibling is first on the axis; the sibling
preceding that node is the second on the axis and so on. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextPrecedingSibling(self, ctxt):
"""Traversal function for the "preceding-sibling" direction
The preceding-sibling axis contains the preceding siblings
of the context node in reverse document order; the first
preceding sibling is first on the axis; the sibling
preceding that node is the second on the axis and so on. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextPrecedingSibling",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextPrecedingSibling",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextPrecedingSibling() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "preceding-sibling" direction
The preceding-sibling axis contains the preceding siblings
of the context node in reverse document order; the first
preceding sibling is first on the axis; the sibling
preceding that node is the second on the axis and so on. | [
"Traversal",
"function",
"for",
"the",
"preceding",
"-",
"sibling",
"direction",
"The",
"preceding",
"-",
"sibling",
"axis",
"contains",
"the",
"preceding",
"siblings",
"of",
"the",
"context",
"node",
"in",
"reverse",
"document",
"order",
";",
"the",
"first",
"preceding",
"sibling",
"is",
"first",
"on",
"the",
"axis",
";",
"the",
"sibling",
"preceding",
"that",
"node",
"is",
"the",
"second",
"on",
"the",
"axis",
"and",
"so",
"on",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3888-L3899 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpathNextSelf | def xpathNextSelf(self, ctxt):
"""Traversal function for the "self" direction The self axis
contains just the context node itself """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextSelf() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def xpathNextSelf(self, ctxt):
"""Traversal function for the "self" direction The self axis
contains just the context node itself """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
if ret is None:raise xpathError('xmlXPathNextSelf() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"xpathNextSelf",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPathNextSelf",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"xpathError",
"(",
"'xmlXPathNextSelf() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Traversal function for the "self" direction The self axis
contains just the context node itself | [
"Traversal",
"function",
"for",
"the",
"self",
"direction",
"The",
"self",
"axis",
"contains",
"just",
"the",
"context",
"node",
"itself"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3901-L3909 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpointerNewCollapsedRange | def xpointerNewCollapsedRange(self):
"""Create a new xmlXPathObjectPtr of type range using a single
nodes """
ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
return xpathObjectRet(ret) | python | def xpointerNewCollapsedRange(self):
"""Create a new xmlXPathObjectPtr of type range using a single
nodes """
ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
return xpathObjectRet(ret) | [
"def",
"xpointerNewCollapsedRange",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlXPtrNewCollapsedRange",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlXPtrNewCollapsedRange() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Create a new xmlXPathObjectPtr of type range using a single
nodes | [
"Create",
"a",
"new",
"xmlXPathObjectPtr",
"of",
"type",
"range",
"using",
"a",
"single",
"nodes"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3915-L3920 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpointerNewContext | def xpointerNewContext(self, doc, origin):
"""Create a new XPointer context """
if doc is None: doc__o = None
else: doc__o = doc._o
if origin is None: origin__o = None
else: origin__o = origin._o
ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
if ret is None:raise treeError('xmlXPtrNewContext() failed')
__tmp = xpathContext(_obj=ret)
return __tmp | python | def xpointerNewContext(self, doc, origin):
"""Create a new XPointer context """
if doc is None: doc__o = None
else: doc__o = doc._o
if origin is None: origin__o = None
else: origin__o = origin._o
ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
if ret is None:raise treeError('xmlXPtrNewContext() failed')
__tmp = xpathContext(_obj=ret)
return __tmp | [
"def",
"xpointerNewContext",
"(",
"self",
",",
"doc",
",",
"origin",
")",
":",
"if",
"doc",
"is",
"None",
":",
"doc__o",
"=",
"None",
"else",
":",
"doc__o",
"=",
"doc",
".",
"_o",
"if",
"origin",
"is",
"None",
":",
"origin__o",
"=",
"None",
"else",
":",
"origin__o",
"=",
"origin",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPtrNewContext",
"(",
"doc__o",
",",
"self",
".",
"_o",
",",
"origin__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlXPtrNewContext() failed'",
")",
"__tmp",
"=",
"xpathContext",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create a new XPointer context | [
"Create",
"a",
"new",
"XPointer",
"context"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3922-L3931 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpointerNewLocationSetNodes | def xpointerNewLocationSetNodes(self, end):
"""Create a new xmlXPathObjectPtr of type LocationSet and
initialize it with the single range made of the two nodes
@start and @end """
if end is None: end__o = None
else: end__o = end._o
ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
return xpathObjectRet(ret) | python | def xpointerNewLocationSetNodes(self, end):
"""Create a new xmlXPathObjectPtr of type LocationSet and
initialize it with the single range made of the two nodes
@start and @end """
if end is None: end__o = None
else: end__o = end._o
ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
return xpathObjectRet(ret) | [
"def",
"xpointerNewLocationSetNodes",
"(",
"self",
",",
"end",
")",
":",
"if",
"end",
"is",
"None",
":",
"end__o",
"=",
"None",
"else",
":",
"end__o",
"=",
"end",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPtrNewLocationSetNodes",
"(",
"self",
".",
"_o",
",",
"end__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlXPtrNewLocationSetNodes() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Create a new xmlXPathObjectPtr of type LocationSet and
initialize it with the single range made of the two nodes
@start and @end | [
"Create",
"a",
"new",
"xmlXPathObjectPtr",
"of",
"type",
"LocationSet",
"and",
"initialize",
"it",
"with",
"the",
"single",
"range",
"made",
"of",
"the",
"two",
"nodes"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3933-L3941 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpointerNewRange | def xpointerNewRange(self, startindex, end, endindex):
"""Create a new xmlXPathObjectPtr of type range """
if end is None: end__o = None
else: end__o = end._o
ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
if ret is None:raise treeError('xmlXPtrNewRange() failed')
return xpathObjectRet(ret) | python | def xpointerNewRange(self, startindex, end, endindex):
"""Create a new xmlXPathObjectPtr of type range """
if end is None: end__o = None
else: end__o = end._o
ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
if ret is None:raise treeError('xmlXPtrNewRange() failed')
return xpathObjectRet(ret) | [
"def",
"xpointerNewRange",
"(",
"self",
",",
"startindex",
",",
"end",
",",
"endindex",
")",
":",
"if",
"end",
"is",
"None",
":",
"end__o",
"=",
"None",
"else",
":",
"end__o",
"=",
"end",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPtrNewRange",
"(",
"self",
".",
"_o",
",",
"startindex",
",",
"end__o",
",",
"endindex",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlXPtrNewRange() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Create a new xmlXPathObjectPtr of type range | [
"Create",
"a",
"new",
"xmlXPathObjectPtr",
"of",
"type",
"range"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3943-L3949 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.xpointerNewRangeNodes | def xpointerNewRangeNodes(self, end):
"""Create a new xmlXPathObjectPtr of type range using 2 nodes """
if end is None: end__o = None
else: end__o = end._o
ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
return xpathObjectRet(ret) | python | def xpointerNewRangeNodes(self, end):
"""Create a new xmlXPathObjectPtr of type range using 2 nodes """
if end is None: end__o = None
else: end__o = end._o
ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
return xpathObjectRet(ret) | [
"def",
"xpointerNewRangeNodes",
"(",
"self",
",",
"end",
")",
":",
"if",
"end",
"is",
"None",
":",
"end__o",
"=",
"None",
"else",
":",
"end__o",
"=",
"end",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlXPtrNewRangeNodes",
"(",
"self",
".",
"_o",
",",
"end__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlXPtrNewRangeNodes() failed'",
")",
"return",
"xpathObjectRet",
"(",
"ret",
")"
] | Create a new xmlXPathObjectPtr of type range using 2 nodes | [
"Create",
"a",
"new",
"xmlXPathObjectPtr",
"of",
"type",
"range",
"using",
"2",
"nodes"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3951-L3957 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlAutoCloseTag | def htmlAutoCloseTag(self, name, elem):
"""The HTML DTD allows a tag to implicitly close other tags.
The list is kept in htmlStartClose array. This function
checks if the element or one of it's children would
autoclose the given tag. """
ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
return ret | python | def htmlAutoCloseTag(self, name, elem):
"""The HTML DTD allows a tag to implicitly close other tags.
The list is kept in htmlStartClose array. This function
checks if the element or one of it's children would
autoclose the given tag. """
ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
return ret | [
"def",
"htmlAutoCloseTag",
"(",
"self",
",",
"name",
",",
"elem",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlAutoCloseTag",
"(",
"self",
".",
"_o",
",",
"name",
",",
"elem",
")",
"return",
"ret"
] | The HTML DTD allows a tag to implicitly close other tags.
The list is kept in htmlStartClose array. This function
checks if the element or one of it's children would
autoclose the given tag. | [
"The",
"HTML",
"DTD",
"allows",
"a",
"tag",
"to",
"implicitly",
"close",
"other",
"tags",
".",
"The",
"list",
"is",
"kept",
"in",
"htmlStartClose",
"array",
".",
"This",
"function",
"checks",
"if",
"the",
"element",
"or",
"one",
"of",
"it",
"s",
"children",
"would",
"autoclose",
"the",
"given",
"tag",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3972-L3978 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlIsAutoClosed | def htmlIsAutoClosed(self, elem):
"""The HTML DTD allows a tag to implicitly close other tags.
The list is kept in htmlStartClose array. This function
checks if a tag is autoclosed by one of it's child """
ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
return ret | python | def htmlIsAutoClosed(self, elem):
"""The HTML DTD allows a tag to implicitly close other tags.
The list is kept in htmlStartClose array. This function
checks if a tag is autoclosed by one of it's child """
ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
return ret | [
"def",
"htmlIsAutoClosed",
"(",
"self",
",",
"elem",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlIsAutoClosed",
"(",
"self",
".",
"_o",
",",
"elem",
")",
"return",
"ret"
] | The HTML DTD allows a tag to implicitly close other tags.
The list is kept in htmlStartClose array. This function
checks if a tag is autoclosed by one of it's child | [
"The",
"HTML",
"DTD",
"allows",
"a",
"tag",
"to",
"implicitly",
"close",
"other",
"tags",
".",
"The",
"list",
"is",
"kept",
"in",
"htmlStartClose",
"array",
".",
"This",
"function",
"checks",
"if",
"a",
"tag",
"is",
"autoclosed",
"by",
"one",
"of",
"it",
"s",
"child"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3980-L3985 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlDocContentDumpFormatOutput | def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
"""Dump an HTML document. """
if buf is None: buf__o = None
else: buf__o = buf._o
libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format) | python | def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
"""Dump an HTML document. """
if buf is None: buf__o = None
else: buf__o = buf._o
libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format) | [
"def",
"htmlDocContentDumpFormatOutput",
"(",
"self",
",",
"buf",
",",
"encoding",
",",
"format",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"libxml2mod",
".",
"htmlDocContentDumpFormatOutput",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"encoding",
",",
"format",
")"
] | Dump an HTML document. | [
"Dump",
"an",
"HTML",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3991-L3995 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlDocContentDumpOutput | def htmlDocContentDumpOutput(self, buf, encoding):
"""Dump an HTML document. Formating return/spaces are added. """
if buf is None: buf__o = None
else: buf__o = buf._o
libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding) | python | def htmlDocContentDumpOutput(self, buf, encoding):
"""Dump an HTML document. Formating return/spaces are added. """
if buf is None: buf__o = None
else: buf__o = buf._o
libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding) | [
"def",
"htmlDocContentDumpOutput",
"(",
"self",
",",
"buf",
",",
"encoding",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"libxml2mod",
".",
"htmlDocContentDumpOutput",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"encoding",
")"
] | Dump an HTML document. Formating return/spaces are added. | [
"Dump",
"an",
"HTML",
"document",
".",
"Formating",
"return",
"/",
"spaces",
"are",
"added",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3997-L4001 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlDocDump | def htmlDocDump(self, f):
"""Dump an HTML document to an open FILE. """
ret = libxml2mod.htmlDocDump(f, self._o)
return ret | python | def htmlDocDump(self, f):
"""Dump an HTML document to an open FILE. """
ret = libxml2mod.htmlDocDump(f, self._o)
return ret | [
"def",
"htmlDocDump",
"(",
"self",
",",
"f",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlDocDump",
"(",
"f",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Dump an HTML document to an open FILE. | [
"Dump",
"an",
"HTML",
"document",
"to",
"an",
"open",
"FILE",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4003-L4006 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlNodeDumpFile | def htmlNodeDumpFile(self, out, cur):
"""Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns are added. """
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDumpFile(out, self._o, cur__o) | python | def htmlNodeDumpFile(self, out, cur):
"""Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns are added. """
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDumpFile(out, self._o, cur__o) | [
"def",
"htmlNodeDumpFile",
"(",
"self",
",",
"out",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"libxml2mod",
".",
"htmlNodeDumpFile",
"(",
"out",
",",
"self",
".",
"_o",
",",
"cur__o",
")"
] | Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns are added. | [
"Dump",
"an",
"HTML",
"node",
"recursive",
"behaviour",
"children",
"are",
"printed",
"too",
"and",
"formatting",
"returns",
"are",
"added",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4013-L4018 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlNodeDumpFileFormat | def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
"""Dump an HTML node, recursive behaviour,children are printed
too. TODO: if encoding == None try to save in the doc
encoding """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
return ret | python | def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
"""Dump an HTML node, recursive behaviour,children are printed
too. TODO: if encoding == None try to save in the doc
encoding """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
return ret | [
"def",
"htmlNodeDumpFileFormat",
"(",
"self",
",",
"out",
",",
"cur",
",",
"encoding",
",",
"format",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"htmlNodeDumpFileFormat",
"(",
"out",
",",
"self",
".",
"_o",
",",
"cur__o",
",",
"encoding",
",",
"format",
")",
"return",
"ret"
] | Dump an HTML node, recursive behaviour,children are printed
too. TODO: if encoding == None try to save in the doc
encoding | [
"Dump",
"an",
"HTML",
"node",
"recursive",
"behaviour",
"children",
"are",
"printed",
"too",
".",
"TODO",
":",
"if",
"encoding",
"==",
"None",
"try",
"to",
"save",
"in",
"the",
"doc",
"encoding"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4020-L4027 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlNodeDumpFormatOutput | def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
"""Dump an HTML node, recursive behaviour,children are printed
too. """
if buf is None: buf__o = None
else: buf__o = buf._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format) | python | def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
"""Dump an HTML node, recursive behaviour,children are printed
too. """
if buf is None: buf__o = None
else: buf__o = buf._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format) | [
"def",
"htmlNodeDumpFormatOutput",
"(",
"self",
",",
"buf",
",",
"cur",
",",
"encoding",
",",
"format",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"libxml2mod",
".",
"htmlNodeDumpFormatOutput",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"cur__o",
",",
"encoding",
",",
"format",
")"
] | Dump an HTML node, recursive behaviour,children are printed
too. | [
"Dump",
"an",
"HTML",
"node",
"recursive",
"behaviour",
"children",
"are",
"printed",
"too",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4029-L4036 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlNodeDumpOutput | def htmlNodeDumpOutput(self, buf, cur, encoding):
"""Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns/spaces are added. """
if buf is None: buf__o = None
else: buf__o = buf._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding) | python | def htmlNodeDumpOutput(self, buf, cur, encoding):
"""Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns/spaces are added. """
if buf is None: buf__o = None
else: buf__o = buf._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding) | [
"def",
"htmlNodeDumpOutput",
"(",
"self",
",",
"buf",
",",
"cur",
",",
"encoding",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"libxml2mod",
".",
"htmlNodeDumpOutput",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"cur__o",
",",
"encoding",
")"
] | Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns/spaces are added. | [
"Dump",
"an",
"HTML",
"node",
"recursive",
"behaviour",
"children",
"are",
"printed",
"too",
"and",
"formatting",
"returns",
"/",
"spaces",
"are",
"added",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4038-L4045 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlSaveFile | def htmlSaveFile(self, filename):
"""Dump an HTML document to a file. If @filename is "-" the
stdout file is used. """
ret = libxml2mod.htmlSaveFile(filename, self._o)
return ret | python | def htmlSaveFile(self, filename):
"""Dump an HTML document to a file. If @filename is "-" the
stdout file is used. """
ret = libxml2mod.htmlSaveFile(filename, self._o)
return ret | [
"def",
"htmlSaveFile",
"(",
"self",
",",
"filename",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlSaveFile",
"(",
"filename",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Dump an HTML document to a file. If @filename is "-" the
stdout file is used. | [
"Dump",
"an",
"HTML",
"document",
"to",
"a",
"file",
".",
"If"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4047-L4051 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlSaveFileEnc | def htmlSaveFileEnc(self, filename, encoding):
"""Dump an HTML document to a file using a given encoding and
formatting returns/spaces are added. """
ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
return ret | python | def htmlSaveFileEnc(self, filename, encoding):
"""Dump an HTML document to a file using a given encoding and
formatting returns/spaces are added. """
ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
return ret | [
"def",
"htmlSaveFileEnc",
"(",
"self",
",",
"filename",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlSaveFileEnc",
"(",
"filename",
",",
"self",
".",
"_o",
",",
"encoding",
")",
"return",
"ret"
] | Dump an HTML document to a file using a given encoding and
formatting returns/spaces are added. | [
"Dump",
"an",
"HTML",
"document",
"to",
"a",
"file",
"using",
"a",
"given",
"encoding",
"and",
"formatting",
"returns",
"/",
"spaces",
"are",
"added",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4053-L4057 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlSaveFileFormat | def htmlSaveFileFormat(self, filename, encoding, format):
"""Dump an HTML document to a file using a given encoding. """
ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
return ret | python | def htmlSaveFileFormat(self, filename, encoding, format):
"""Dump an HTML document to a file using a given encoding. """
ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
return ret | [
"def",
"htmlSaveFileFormat",
"(",
"self",
",",
"filename",
",",
"encoding",
",",
"format",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlSaveFileFormat",
"(",
"filename",
",",
"self",
".",
"_o",
",",
"encoding",
",",
"format",
")",
"return",
"ret"
] | Dump an HTML document to a file using a given encoding. | [
"Dump",
"an",
"HTML",
"document",
"to",
"a",
"file",
"using",
"a",
"given",
"encoding",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4059-L4062 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.htmlSetMetaEncoding | def htmlSetMetaEncoding(self, encoding):
"""Sets the current encoding in the Meta tags NOTE: this will
not change the document content encoding, just the META
flag associated. """
ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
return ret | python | def htmlSetMetaEncoding(self, encoding):
"""Sets the current encoding in the Meta tags NOTE: this will
not change the document content encoding, just the META
flag associated. """
ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
return ret | [
"def",
"htmlSetMetaEncoding",
"(",
"self",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlSetMetaEncoding",
"(",
"self",
".",
"_o",
",",
"encoding",
")",
"return",
"ret"
] | Sets the current encoding in the Meta tags NOTE: this will
not change the document content encoding, just the META
flag associated. | [
"Sets",
"the",
"current",
"encoding",
"in",
"the",
"Meta",
"tags",
"NOTE",
":",
"this",
"will",
"not",
"change",
"the",
"document",
"content",
"encoding",
"just",
"the",
"META",
"flag",
"associated",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4064-L4069 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.debugCheckDocument | def debugCheckDocument(self, output):
"""Check the document for potential content problems, and
output the errors to @output """
ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
return ret | python | def debugCheckDocument(self, output):
"""Check the document for potential content problems, and
output the errors to @output """
ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
return ret | [
"def",
"debugCheckDocument",
"(",
"self",
",",
"output",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlDebugCheckDocument",
"(",
"output",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Check the document for potential content problems, and
output the errors to @output | [
"Check",
"the",
"document",
"for",
"potential",
"content",
"problems",
"and",
"output",
"the",
"errors",
"to"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4075-L4079 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.addDocEntity | def addDocEntity(self, name, type, ExternalID, SystemID, content):
"""Register a new entity for this document. """
ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
if ret is None:raise treeError('xmlAddDocEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | python | def addDocEntity(self, name, type, ExternalID, SystemID, content):
"""Register a new entity for this document. """
ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
if ret is None:raise treeError('xmlAddDocEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | [
"def",
"addDocEntity",
"(",
"self",
",",
"name",
",",
"type",
",",
"ExternalID",
",",
"SystemID",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlAddDocEntity",
"(",
"self",
".",
"_o",
",",
"name",
",",
"type",
",",
"ExternalID",
",",
"SystemID",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddDocEntity() failed'",
")",
"__tmp",
"=",
"xmlEntity",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Register a new entity for this document. | [
"Register",
"a",
"new",
"entity",
"for",
"this",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4099-L4104 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.addDtdEntity | def addDtdEntity(self, name, type, ExternalID, SystemID, content):
"""Register a new entity for this document DTD external subset. """
ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
if ret is None:raise treeError('xmlAddDtdEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | python | def addDtdEntity(self, name, type, ExternalID, SystemID, content):
"""Register a new entity for this document DTD external subset. """
ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
if ret is None:raise treeError('xmlAddDtdEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | [
"def",
"addDtdEntity",
"(",
"self",
",",
"name",
",",
"type",
",",
"ExternalID",
",",
"SystemID",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlAddDtdEntity",
"(",
"self",
".",
"_o",
",",
"name",
",",
"type",
",",
"ExternalID",
",",
"SystemID",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlAddDtdEntity() failed'",
")",
"__tmp",
"=",
"xmlEntity",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Register a new entity for this document DTD external subset. | [
"Register",
"a",
"new",
"entity",
"for",
"this",
"document",
"DTD",
"external",
"subset",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4106-L4111 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.docEntity | def docEntity(self, name):
"""Do an entity lookup in the document entity hash table and """
ret = libxml2mod.xmlGetDocEntity(self._o, name)
if ret is None:raise treeError('xmlGetDocEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | python | def docEntity(self, name):
"""Do an entity lookup in the document entity hash table and """
ret = libxml2mod.xmlGetDocEntity(self._o, name)
if ret is None:raise treeError('xmlGetDocEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | [
"def",
"docEntity",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetDocEntity",
"(",
"self",
".",
"_o",
",",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetDocEntity() failed'",
")",
"__tmp",
"=",
"xmlEntity",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do an entity lookup in the document entity hash table and | [
"Do",
"an",
"entity",
"lookup",
"in",
"the",
"document",
"entity",
"hash",
"table",
"and"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4113-L4118 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.dtdEntity | def dtdEntity(self, name):
"""Do an entity lookup in the DTD entity hash table and """
ret = libxml2mod.xmlGetDtdEntity(self._o, name)
if ret is None:raise treeError('xmlGetDtdEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | python | def dtdEntity(self, name):
"""Do an entity lookup in the DTD entity hash table and """
ret = libxml2mod.xmlGetDtdEntity(self._o, name)
if ret is None:raise treeError('xmlGetDtdEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | [
"def",
"dtdEntity",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetDtdEntity",
"(",
"self",
".",
"_o",
",",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetDtdEntity() failed'",
")",
"__tmp",
"=",
"xmlEntity",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do an entity lookup in the DTD entity hash table and | [
"Do",
"an",
"entity",
"lookup",
"in",
"the",
"DTD",
"entity",
"hash",
"table",
"and"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4120-L4125 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.encodeEntities | def encodeEntities(self, input):
"""TODO: remove xmlEncodeEntities, once we are not afraid of
breaking binary compatibility People must migrate their
code to xmlEncodeEntitiesReentrant ! This routine will
issue a warning when encountered. """
ret = libxml2mod.xmlEncodeEntities(self._o, input)
return ret | python | def encodeEntities(self, input):
"""TODO: remove xmlEncodeEntities, once we are not afraid of
breaking binary compatibility People must migrate their
code to xmlEncodeEntitiesReentrant ! This routine will
issue a warning when encountered. """
ret = libxml2mod.xmlEncodeEntities(self._o, input)
return ret | [
"def",
"encodeEntities",
"(",
"self",
",",
"input",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlEncodeEntities",
"(",
"self",
".",
"_o",
",",
"input",
")",
"return",
"ret"
] | TODO: remove xmlEncodeEntities, once we are not afraid of
breaking binary compatibility People must migrate their
code to xmlEncodeEntitiesReentrant ! This routine will
issue a warning when encountered. | [
"TODO",
":",
"remove",
"xmlEncodeEntities",
"once",
"we",
"are",
"not",
"afraid",
"of",
"breaking",
"binary",
"compatibility",
"People",
"must",
"migrate",
"their",
"code",
"to",
"xmlEncodeEntitiesReentrant",
"!",
"This",
"routine",
"will",
"issue",
"a",
"warning",
"when",
"encountered",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4127-L4133 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.encodeEntitiesReentrant | def encodeEntitiesReentrant(self, input):
"""Do a global encoding of a string, replacing the predefined
entities and non ASCII values with their entities and
CharRef counterparts. Contrary to xmlEncodeEntities, this
routine is reentrant, and result must be deallocated. """
ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
return ret | python | def encodeEntitiesReentrant(self, input):
"""Do a global encoding of a string, replacing the predefined
entities and non ASCII values with their entities and
CharRef counterparts. Contrary to xmlEncodeEntities, this
routine is reentrant, and result must be deallocated. """
ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
return ret | [
"def",
"encodeEntitiesReentrant",
"(",
"self",
",",
"input",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlEncodeEntitiesReentrant",
"(",
"self",
".",
"_o",
",",
"input",
")",
"return",
"ret"
] | Do a global encoding of a string, replacing the predefined
entities and non ASCII values with their entities and
CharRef counterparts. Contrary to xmlEncodeEntities, this
routine is reentrant, and result must be deallocated. | [
"Do",
"a",
"global",
"encoding",
"of",
"a",
"string",
"replacing",
"the",
"predefined",
"entities",
"and",
"non",
"ASCII",
"values",
"with",
"their",
"entities",
"and",
"CharRef",
"counterparts",
".",
"Contrary",
"to",
"xmlEncodeEntities",
"this",
"routine",
"is",
"reentrant",
"and",
"result",
"must",
"be",
"deallocated",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4135-L4141 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.encodeSpecialChars | def encodeSpecialChars(self, input):
"""Do a global encoding of a string, replacing the predefined
entities this routine is reentrant, and result must be
deallocated. """
ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
return ret | python | def encodeSpecialChars(self, input):
"""Do a global encoding of a string, replacing the predefined
entities this routine is reentrant, and result must be
deallocated. """
ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
return ret | [
"def",
"encodeSpecialChars",
"(",
"self",
",",
"input",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlEncodeSpecialChars",
"(",
"self",
".",
"_o",
",",
"input",
")",
"return",
"ret"
] | Do a global encoding of a string, replacing the predefined
entities this routine is reentrant, and result must be
deallocated. | [
"Do",
"a",
"global",
"encoding",
"of",
"a",
"string",
"replacing",
"the",
"predefined",
"entities",
"this",
"routine",
"is",
"reentrant",
"and",
"result",
"must",
"be",
"deallocated",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4143-L4148 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newEntity | def newEntity(self, name, type, ExternalID, SystemID, content):
"""Create a new entity, this differs from xmlAddDocEntity()
that if the document is None or has no internal subset
defined, then an unlinked entity structure will be
returned, it is then the responsability of the caller to
link it to the document later or free it when not needed
anymore. """
ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
if ret is None:raise treeError('xmlNewEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | python | def newEntity(self, name, type, ExternalID, SystemID, content):
"""Create a new entity, this differs from xmlAddDocEntity()
that if the document is None or has no internal subset
defined, then an unlinked entity structure will be
returned, it is then the responsability of the caller to
link it to the document later or free it when not needed
anymore. """
ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
if ret is None:raise treeError('xmlNewEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | [
"def",
"newEntity",
"(",
"self",
",",
"name",
",",
"type",
",",
"ExternalID",
",",
"SystemID",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewEntity",
"(",
"self",
".",
"_o",
",",
"name",
",",
"type",
",",
"ExternalID",
",",
"SystemID",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewEntity() failed'",
")",
"__tmp",
"=",
"xmlEntity",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create a new entity, this differs from xmlAddDocEntity()
that if the document is None or has no internal subset
defined, then an unlinked entity structure will be
returned, it is then the responsability of the caller to
link it to the document later or free it when not needed
anymore. | [
"Create",
"a",
"new",
"entity",
"this",
"differs",
"from",
"xmlAddDocEntity",
"()",
"that",
"if",
"the",
"document",
"is",
"None",
"or",
"has",
"no",
"internal",
"subset",
"defined",
"then",
"an",
"unlinked",
"entity",
"structure",
"will",
"be",
"returned",
"it",
"is",
"then",
"the",
"responsability",
"of",
"the",
"caller",
"to",
"link",
"it",
"to",
"the",
"document",
"later",
"or",
"free",
"it",
"when",
"not",
"needed",
"anymore",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4150-L4160 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.parameterEntity | def parameterEntity(self, name):
"""Do an entity lookup in the internal and external subsets and """
ret = libxml2mod.xmlGetParameterEntity(self._o, name)
if ret is None:raise treeError('xmlGetParameterEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | python | def parameterEntity(self, name):
"""Do an entity lookup in the internal and external subsets and """
ret = libxml2mod.xmlGetParameterEntity(self._o, name)
if ret is None:raise treeError('xmlGetParameterEntity() failed')
__tmp = xmlEntity(_obj=ret)
return __tmp | [
"def",
"parameterEntity",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetParameterEntity",
"(",
"self",
".",
"_o",
",",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetParameterEntity() failed'",
")",
"__tmp",
"=",
"xmlEntity",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do an entity lookup in the internal and external subsets and | [
"Do",
"an",
"entity",
"lookup",
"in",
"the",
"internal",
"and",
"external",
"subsets",
"and"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4162-L4167 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.relaxNGNewDocParserCtxt | def relaxNGNewDocParserCtxt(self):
"""Create an XML RelaxNGs parser context for that document.
Note: since the process of compiling a RelaxNG schemas
modifies the document, the @doc parameter is duplicated
internally. """
ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
__tmp = relaxNgParserCtxt(_obj=ret)
return __tmp | python | def relaxNGNewDocParserCtxt(self):
"""Create an XML RelaxNGs parser context for that document.
Note: since the process of compiling a RelaxNG schemas
modifies the document, the @doc parameter is duplicated
internally. """
ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
__tmp = relaxNgParserCtxt(_obj=ret)
return __tmp | [
"def",
"relaxNGNewDocParserCtxt",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGNewDocParserCtxt",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlRelaxNGNewDocParserCtxt() failed'",
")",
"__tmp",
"=",
"relaxNgParserCtxt",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create an XML RelaxNGs parser context for that document.
Note: since the process of compiling a RelaxNG schemas
modifies the document, the @doc parameter is duplicated
internally. | [
"Create",
"an",
"XML",
"RelaxNGs",
"parser",
"context",
"for",
"that",
"document",
".",
"Note",
":",
"since",
"the",
"process",
"of",
"compiling",
"a",
"RelaxNG",
"schemas",
"modifies",
"the",
"document",
"the"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4173-L4181 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.relaxNGValidateDoc | def relaxNGValidateDoc(self, ctxt):
"""Validate a document tree in memory. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
return ret | python | def relaxNGValidateDoc(self, ctxt):
"""Validate a document tree in memory. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
return ret | [
"def",
"relaxNGValidateDoc",
"(",
"self",
",",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGValidateDoc",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Validate a document tree in memory. | [
"Validate",
"a",
"document",
"tree",
"in",
"memory",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4183-L4188 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.relaxNGValidateFullElement | def relaxNGValidateFullElement(self, ctxt, elem):
"""Validate a full subtree when
xmlRelaxNGValidatePushElement() returned 0 and the content
of the node has been expanded. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
return ret | python | def relaxNGValidateFullElement(self, ctxt, elem):
"""Validate a full subtree when
xmlRelaxNGValidatePushElement() returned 0 and the content
of the node has been expanded. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
return ret | [
"def",
"relaxNGValidateFullElement",
"(",
"self",
",",
"ctxt",
",",
"elem",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGValidateFullElement",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
",",
"elem__o",
")",
"return",
"ret"
] | Validate a full subtree when
xmlRelaxNGValidatePushElement() returned 0 and the content
of the node has been expanded. | [
"Validate",
"a",
"full",
"subtree",
"when",
"xmlRelaxNGValidatePushElement",
"()",
"returned",
"0",
"and",
"the",
"content",
"of",
"the",
"node",
"has",
"been",
"expanded",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4190-L4199 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.relaxNGValidatePopElement | def relaxNGValidatePopElement(self, ctxt, elem):
"""Pop the element end from the RelaxNG validation stack. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
return ret | python | def relaxNGValidatePopElement(self, ctxt, elem):
"""Pop the element end from the RelaxNG validation stack. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
return ret | [
"def",
"relaxNGValidatePopElement",
"(",
"self",
",",
"ctxt",
",",
"elem",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGValidatePopElement",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
",",
"elem__o",
")",
"return",
"ret"
] | Pop the element end from the RelaxNG validation stack. | [
"Pop",
"the",
"element",
"end",
"from",
"the",
"RelaxNG",
"validation",
"stack",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4201-L4208 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.relaxNGValidatePushElement | def relaxNGValidatePushElement(self, ctxt, elem):
"""Push a new element start on the RelaxNG validation stack. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
return ret | python | def relaxNGValidatePushElement(self, ctxt, elem):
"""Push a new element start on the RelaxNG validation stack. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
return ret | [
"def",
"relaxNGValidatePushElement",
"(",
"self",
",",
"ctxt",
",",
"elem",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGValidatePushElement",
"(",
"ctxt__o",
",",
"self",
".",
"_o",
",",
"elem__o",
")",
"return",
"ret"
] | Push a new element start on the RelaxNG validation stack. | [
"Push",
"a",
"new",
"element",
"start",
"on",
"the",
"RelaxNG",
"validation",
"stack",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4210-L4217 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.copyDoc | def copyDoc(self, recursive):
"""Do a copy of the document info. If recursive, the content
tree will be copied too as well as DTD, namespaces and
entities. """
ret = libxml2mod.xmlCopyDoc(self._o, recursive)
if ret is None:raise treeError('xmlCopyDoc() failed')
__tmp = xmlDoc(_obj=ret)
return __tmp | python | def copyDoc(self, recursive):
"""Do a copy of the document info. If recursive, the content
tree will be copied too as well as DTD, namespaces and
entities. """
ret = libxml2mod.xmlCopyDoc(self._o, recursive)
if ret is None:raise treeError('xmlCopyDoc() failed')
__tmp = xmlDoc(_obj=ret)
return __tmp | [
"def",
"copyDoc",
"(",
"self",
",",
"recursive",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyDoc",
"(",
"self",
".",
"_o",
",",
"recursive",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCopyDoc() failed'",
")",
"__tmp",
"=",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Do a copy of the document info. If recursive, the content
tree will be copied too as well as DTD, namespaces and
entities. | [
"Do",
"a",
"copy",
"of",
"the",
"document",
"info",
".",
"If",
"recursive",
"the",
"content",
"tree",
"will",
"be",
"copied",
"too",
"as",
"well",
"as",
"DTD",
"namespaces",
"and",
"entities",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4223-L4230 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.copyNode | def copyNode(self, node, extended):
"""Do a copy of the node to a given document. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
if ret is None:raise treeError('xmlDocCopyNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def copyNode(self, node, extended):
"""Do a copy of the node to a given document. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
if ret is None:raise treeError('xmlDocCopyNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"copyNode",
"(",
"self",
",",
"node",
",",
"extended",
")",
":",
"if",
"node",
"is",
"None",
":",
"node__o",
"=",
"None",
"else",
":",
"node__o",
"=",
"node",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlDocCopyNode",
"(",
"node__o",
",",
"self",
".",
"_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#L4232-L4239 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.copyNodeList | def copyNodeList(self, node):
"""Do a recursive copy of the node list. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
if ret is None:raise treeError('xmlDocCopyNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def copyNodeList(self, node):
"""Do a recursive copy of the node list. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
if ret is None:raise treeError('xmlDocCopyNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"copyNodeList",
"(",
"self",
",",
"node",
")",
":",
"if",
"node",
"is",
"None",
":",
"node__o",
"=",
"None",
"else",
":",
"node__o",
"=",
"node",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlDocCopyNodeList",
"(",
"self",
".",
"_o",
",",
"node__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#L4241-L4248 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.createIntSubset | def createIntSubset(self, name, ExternalID, SystemID):
"""Create the internal subset of a document """
ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
if ret is None:raise treeError('xmlCreateIntSubset() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp | python | def createIntSubset(self, name, ExternalID, SystemID):
"""Create the internal subset of a document """
ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
if ret is None:raise treeError('xmlCreateIntSubset() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp | [
"def",
"createIntSubset",
"(",
"self",
",",
"name",
",",
"ExternalID",
",",
"SystemID",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateIntSubset",
"(",
"self",
".",
"_o",
",",
"name",
",",
"ExternalID",
",",
"SystemID",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCreateIntSubset() failed'",
")",
"__tmp",
"=",
"xmlDtd",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create the internal subset of a document | [
"Create",
"the",
"internal",
"subset",
"of",
"a",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4250-L4255 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.dump | def dump(self, f):
"""Dump an XML document to an open FILE. """
ret = libxml2mod.xmlDocDump(f, self._o)
return ret | python | def dump(self, f):
"""Dump an XML document to an open FILE. """
ret = libxml2mod.xmlDocDump(f, self._o)
return ret | [
"def",
"dump",
"(",
"self",
",",
"f",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlDocDump",
"(",
"f",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Dump an XML document to an open FILE. | [
"Dump",
"an",
"XML",
"document",
"to",
"an",
"open",
"FILE",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4262-L4265 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.elemDump | def elemDump(self, f, cur):
"""Dump an XML/HTML node, recursive behaviour, children are
printed too. """
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.xmlElemDump(f, self._o, cur__o) | python | def elemDump(self, f, cur):
"""Dump an XML/HTML node, recursive behaviour, children are
printed too. """
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.xmlElemDump(f, self._o, cur__o) | [
"def",
"elemDump",
"(",
"self",
",",
"f",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"libxml2mod",
".",
"xmlElemDump",
"(",
"f",
",",
"self",
".",
"_o",
",",
"cur__o",
")"
] | Dump an XML/HTML node, recursive behaviour, children are
printed too. | [
"Dump",
"an",
"XML",
"/",
"HTML",
"node",
"recursive",
"behaviour",
"children",
"are",
"printed",
"too",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4267-L4272 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.formatDump | def formatDump(self, f, format):
"""Dump an XML document to an open FILE. """
ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
return ret | python | def formatDump(self, f, format):
"""Dump an XML document to an open FILE. """
ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
return ret | [
"def",
"formatDump",
"(",
"self",
",",
"f",
",",
"format",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlDocFormatDump",
"(",
"f",
",",
"self",
".",
"_o",
",",
"format",
")",
"return",
"ret"
] | Dump an XML document to an open FILE. | [
"Dump",
"an",
"XML",
"document",
"to",
"an",
"open",
"FILE",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4274-L4277 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.getRootElement | def getRootElement(self):
"""Get the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). """
ret = libxml2mod.xmlDocGetRootElement(self._o)
if ret is None:raise treeError('xmlDocGetRootElement() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def getRootElement(self):
"""Get the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). """
ret = libxml2mod.xmlDocGetRootElement(self._o)
if ret is None:raise treeError('xmlDocGetRootElement() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"getRootElement",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlDocGetRootElement",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlDocGetRootElement() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Get the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). | [
"Get",
"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#L4284-L4290 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.intSubset | def intSubset(self):
"""Get the internal subset of a document """
ret = libxml2mod.xmlGetIntSubset(self._o)
if ret is None:raise treeError('xmlGetIntSubset() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp | python | def intSubset(self):
"""Get the internal subset of a document """
ret = libxml2mod.xmlGetIntSubset(self._o)
if ret is None:raise treeError('xmlGetIntSubset() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp | [
"def",
"intSubset",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetIntSubset",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetIntSubset() failed'",
")",
"__tmp",
"=",
"xmlDtd",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Get the internal subset of a document | [
"Get",
"the",
"internal",
"subset",
"of",
"a",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4292-L4297 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newCDataBlock | def newCDataBlock(self, content, len):
"""Creation of a new node containing a CDATA block. """
ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
if ret is None:raise treeError('xmlNewCDataBlock() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newCDataBlock(self, content, len):
"""Creation of a new node containing a CDATA block. """
ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
if ret is None:raise treeError('xmlNewCDataBlock() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newCDataBlock",
"(",
"self",
",",
"content",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewCDataBlock",
"(",
"self",
".",
"_o",
",",
"content",
",",
"len",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewCDataBlock() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new node containing a CDATA block. | [
"Creation",
"of",
"a",
"new",
"node",
"containing",
"a",
"CDATA",
"block",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4299-L4304 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newCharRef | def newCharRef(self, name):
"""Creation of a new character reference node. """
ret = libxml2mod.xmlNewCharRef(self._o, name)
if ret is None:raise treeError('xmlNewCharRef() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newCharRef(self, name):
"""Creation of a new character reference node. """
ret = libxml2mod.xmlNewCharRef(self._o, name)
if ret is None:raise treeError('xmlNewCharRef() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newCharRef",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewCharRef",
"(",
"self",
".",
"_o",
",",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewCharRef() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new character reference node. | [
"Creation",
"of",
"a",
"new",
"character",
"reference",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4306-L4311 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocComment | def newDocComment(self, content):
"""Creation of a new node containing a comment within a
document. """
ret = libxml2mod.xmlNewDocComment(self._o, content)
if ret is None:raise treeError('xmlNewDocComment() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocComment(self, content):
"""Creation of a new node containing a comment within a
document. """
ret = libxml2mod.xmlNewDocComment(self._o, content)
if ret is None:raise treeError('xmlNewDocComment() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocComment",
"(",
"self",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocComment",
"(",
"self",
".",
"_o",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocComment() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new node containing a comment within a
document. | [
"Creation",
"of",
"a",
"new",
"node",
"containing",
"a",
"comment",
"within",
"a",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4313-L4319 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocFragment | def newDocFragment(self):
"""Creation of a new Fragment node. """
ret = libxml2mod.xmlNewDocFragment(self._o)
if ret is None:raise treeError('xmlNewDocFragment() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocFragment(self):
"""Creation of a new Fragment node. """
ret = libxml2mod.xmlNewDocFragment(self._o)
if ret is None:raise treeError('xmlNewDocFragment() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocFragment",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocFragment",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocFragment() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new Fragment node. | [
"Creation",
"of",
"a",
"new",
"Fragment",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4321-L4326 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocNode | def newDocNode(self, ns, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
don't need entities support. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewDocNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocNode(self, ns, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
don't need entities support. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewDocNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocNode",
"(",
"self",
",",
"ns",
",",
"name",
",",
"content",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocNode",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocNode() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
don't need entities support. | [
"Creation",
"of",
"a",
"new",
"node",
"element",
"within",
"a",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4328-L4340 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocNodeEatName | def newDocNodeEatName(self, ns, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
don't need entities support. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocNodeEatName(self, ns, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
don't need entities support. """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocNodeEatName",
"(",
"self",
",",
"ns",
",",
"name",
",",
"content",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocNodeEatName",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocNodeEatName() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
don't need entities support. | [
"Creation",
"of",
"a",
"new",
"node",
"element",
"within",
"a",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4342-L4354 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocPI | def newDocPI(self, name, content):
"""Creation of a processing instruction element. """
ret = libxml2mod.xmlNewDocPI(self._o, name, content)
if ret is None:raise treeError('xmlNewDocPI() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocPI(self, name, content):
"""Creation of a processing instruction element. """
ret = libxml2mod.xmlNewDocPI(self._o, name, content)
if ret is None:raise treeError('xmlNewDocPI() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocPI",
"(",
"self",
",",
"name",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocPI",
"(",
"self",
".",
"_o",
",",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocPI() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a processing instruction element. | [
"Creation",
"of",
"a",
"processing",
"instruction",
"element",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4356-L4361 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocProp | def newDocProp(self, name, value):
"""Create a new property carried by a document. """
ret = libxml2mod.xmlNewDocProp(self._o, name, value)
if ret is None:raise treeError('xmlNewDocProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def newDocProp(self, name, value):
"""Create a new property carried by a document. """
ret = libxml2mod.xmlNewDocProp(self._o, name, value)
if ret is None:raise treeError('xmlNewDocProp() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"newDocProp",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocProp",
"(",
"self",
".",
"_o",
",",
"name",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocProp() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Create a new property carried by a document. | [
"Create",
"a",
"new",
"property",
"carried",
"by",
"a",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4363-L4368 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocRawNode | def newDocRawNode(self, ns, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewDocRawNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocRawNode(self, ns, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). """
if ns is None: ns__o = None
else: ns__o = ns._o
ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
if ret is None:raise treeError('xmlNewDocRawNode() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocRawNode",
"(",
"self",
",",
"ns",
",",
"name",
",",
"content",
")",
":",
"if",
"ns",
"is",
"None",
":",
"ns__o",
"=",
"None",
"else",
":",
"ns__o",
"=",
"ns",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocRawNode",
"(",
"self",
".",
"_o",
",",
"ns__o",
",",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocRawNode() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new node element within a document. @ns and
@content are optional (None). | [
"Creation",
"of",
"a",
"new",
"node",
"element",
"within",
"a",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4370-L4378 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocText | def newDocText(self, content):
"""Creation of a new text node within a document. """
ret = libxml2mod.xmlNewDocText(self._o, content)
if ret is None:raise treeError('xmlNewDocText() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocText(self, content):
"""Creation of a new text node within a document. """
ret = libxml2mod.xmlNewDocText(self._o, content)
if ret is None:raise treeError('xmlNewDocText() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocText",
"(",
"self",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocText",
"(",
"self",
".",
"_o",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocText() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new text node within a document. | [
"Creation",
"of",
"a",
"new",
"text",
"node",
"within",
"a",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4380-L4385 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDocTextLen | def newDocTextLen(self, content, len):
"""Creation of a new text node with an extra content length
parameter. The text node pertain to a given document. """
ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
if ret is None:raise treeError('xmlNewDocTextLen() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newDocTextLen(self, content, len):
"""Creation of a new text node with an extra content length
parameter. The text node pertain to a given document. """
ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
if ret is None:raise treeError('xmlNewDocTextLen() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newDocTextLen",
"(",
"self",
",",
"content",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDocTextLen",
"(",
"self",
".",
"_o",
",",
"content",
",",
"len",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDocTextLen() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new text node with an extra content length
parameter. The text node pertain to a given document. | [
"Creation",
"of",
"a",
"new",
"text",
"node",
"with",
"an",
"extra",
"content",
"length",
"parameter",
".",
"The",
"text",
"node",
"pertain",
"to",
"a",
"given",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4387-L4393 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newDtd | def newDtd(self, name, ExternalID, SystemID):
"""Creation of a new DTD for the external subset. To create an
internal subset, use xmlCreateIntSubset(). """
ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
if ret is None:raise treeError('xmlNewDtd() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp | python | def newDtd(self, name, ExternalID, SystemID):
"""Creation of a new DTD for the external subset. To create an
internal subset, use xmlCreateIntSubset(). """
ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
if ret is None:raise treeError('xmlNewDtd() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp | [
"def",
"newDtd",
"(",
"self",
",",
"name",
",",
"ExternalID",
",",
"SystemID",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDtd",
"(",
"self",
".",
"_o",
",",
"name",
",",
"ExternalID",
",",
"SystemID",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDtd() failed'",
")",
"__tmp",
"=",
"xmlDtd",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new DTD for the external subset. To create an
internal subset, use xmlCreateIntSubset(). | [
"Creation",
"of",
"a",
"new",
"DTD",
"for",
"the",
"external",
"subset",
".",
"To",
"create",
"an",
"internal",
"subset",
"use",
"xmlCreateIntSubset",
"()",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4395-L4401 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newGlobalNs | def newGlobalNs(self, href, prefix):
"""Creation of a Namespace, the old way using PI and without
scoping DEPRECATED !!! """
ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
if ret is None:raise treeError('xmlNewGlobalNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | python | def newGlobalNs(self, href, prefix):
"""Creation of a Namespace, the old way using PI and without
scoping DEPRECATED !!! """
ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
if ret is None:raise treeError('xmlNewGlobalNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"newGlobalNs",
"(",
"self",
",",
"href",
",",
"prefix",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewGlobalNs",
"(",
"self",
".",
"_o",
",",
"href",
",",
"prefix",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewGlobalNs() failed'",
")",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a Namespace, the old way using PI and without
scoping DEPRECATED !!! | [
"Creation",
"of",
"a",
"Namespace",
"the",
"old",
"way",
"using",
"PI",
"and",
"without",
"scoping",
"DEPRECATED",
"!!!"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4403-L4409 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.newReference | def newReference(self, name):
"""Creation of a new reference node. """
ret = libxml2mod.xmlNewReference(self._o, name)
if ret is None:raise treeError('xmlNewReference() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def newReference(self, name):
"""Creation of a new reference node. """
ret = libxml2mod.xmlNewReference(self._o, name)
if ret is None:raise treeError('xmlNewReference() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"newReference",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewReference",
"(",
"self",
".",
"_o",
",",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewReference() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Creation of a new reference node. | [
"Creation",
"of",
"a",
"new",
"reference",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4411-L4416 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.nodeDumpOutput | def nodeDumpOutput(self, buf, cur, level, format, encoding):
"""Dump an XML node, recursive behaviour, children are printed
too. Note that @format = 1 provide node indenting only if
xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
called """
if buf is None: buf__o = None
else: buf__o = buf._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding) | python | def nodeDumpOutput(self, buf, cur, level, format, encoding):
"""Dump an XML node, recursive behaviour, children are printed
too. Note that @format = 1 provide node indenting only if
xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
called """
if buf is None: buf__o = None
else: buf__o = buf._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding) | [
"def",
"nodeDumpOutput",
"(",
"self",
",",
"buf",
",",
"cur",
",",
"level",
",",
"format",
",",
"encoding",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"libxml2mod",
".",
"xmlNodeDumpOutput",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"cur__o",
",",
"level",
",",
"format",
",",
"encoding",
")"
] | Dump an XML node, recursive behaviour, children are printed
too. Note that @format = 1 provide node indenting only if
xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
called | [
"Dump",
"an",
"XML",
"node",
"recursive",
"behaviour",
"children",
"are",
"printed",
"too",
".",
"Note",
"that"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4418-L4427 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.nodeGetBase | def nodeGetBase(self, cur):
"""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 cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
return ret | python | def nodeGetBase(self, cur):
"""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 cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
return ret | [
"def",
"nodeGetBase",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeGetBase",
"(",
"self",
".",
"_o",
",",
"cur__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#L4429-L4439 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.nodeListGetRawString | def nodeListGetRawString(self, list, 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 list is None: list__o = None
else: list__o = list._o
ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
return ret | python | def nodeListGetRawString(self, list, 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 list is None: list__o = None
else: list__o = list._o
ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
return ret | [
"def",
"nodeListGetRawString",
"(",
"self",
",",
"list",
",",
"inLine",
")",
":",
"if",
"list",
"is",
"None",
":",
"list__o",
"=",
"None",
"else",
":",
"list__o",
"=",
"list",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeListGetRawString",
"(",
"self",
".",
"_o",
",",
"list__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#L4441-L4449 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.nodeListGetString | def nodeListGetString(self, list, inLine):
"""Build the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs """
if list is None: list__o = None
else: list__o = list._o
ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
return ret | python | def nodeListGetString(self, list, inLine):
"""Build the string equivalent to the text contained in the
Node list made of TEXTs and ENTITY_REFs """
if list is None: list__o = None
else: list__o = list._o
ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
return ret | [
"def",
"nodeListGetString",
"(",
"self",
",",
"list",
",",
"inLine",
")",
":",
"if",
"list",
"is",
"None",
":",
"list__o",
"=",
"None",
"else",
":",
"list__o",
"=",
"list",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeListGetString",
"(",
"self",
".",
"_o",
",",
"list__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#L4451-L4457 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.reconciliateNs | def reconciliateNs(self, tree):
"""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 tree is None: tree__o = None
else: tree__o = tree._o
ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
return ret | python | def reconciliateNs(self, tree):
"""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 tree is None: tree__o = None
else: tree__o = tree._o
ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
return ret | [
"def",
"reconciliateNs",
"(",
"self",
",",
"tree",
")",
":",
"if",
"tree",
"is",
"None",
":",
"tree__o",
"=",
"None",
"else",
":",
"tree__o",
"=",
"tree",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlReconciliateNs",
"(",
"self",
".",
"_o",
",",
"tree__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#L4459-L4472 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.saveFile | def saveFile(self, filename):
"""Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. """
ret = libxml2mod.xmlSaveFile(filename, self._o)
return ret | python | def saveFile(self, filename):
"""Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. """
ret = libxml2mod.xmlSaveFile(filename, self._o)
return ret | [
"def",
"saveFile",
"(",
"self",
",",
"filename",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFile",
"(",
"filename",
",",
"self",
".",
"_o",
")",
"return",
"ret"
] | Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. | [
"Dump",
"an",
"XML",
"document",
"to",
"a",
"file",
".",
"Will",
"use",
"compression",
"if",
"compiled",
"in",
"and",
"enabled",
".",
"If"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4474-L4479 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.saveFileEnc | def saveFileEnc(self, filename, encoding):
"""Dump an XML document, converting it to the given encoding """
ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
return ret | python | def saveFileEnc(self, filename, encoding):
"""Dump an XML document, converting it to the given encoding """
ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
return ret | [
"def",
"saveFileEnc",
"(",
"self",
",",
"filename",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFileEnc",
"(",
"filename",
",",
"self",
".",
"_o",
",",
"encoding",
")",
"return",
"ret"
] | Dump an XML document, converting it to the given encoding | [
"Dump",
"an",
"XML",
"document",
"converting",
"it",
"to",
"the",
"given",
"encoding"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4481-L4484 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.saveFileTo | def saveFileTo(self, buf, encoding):
"""Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. """
if buf is None: buf__o = None
else: buf__o = buf._o
ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
return ret | python | def saveFileTo(self, buf, encoding):
"""Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. """
if buf is None: buf__o = None
else: buf__o = buf._o
ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
return ret | [
"def",
"saveFileTo",
"(",
"self",
",",
"buf",
",",
"encoding",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFileTo",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"encoding",
")",
"return",
"ret"
] | Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. | [
"Dump",
"an",
"XML",
"document",
"to",
"an",
"I",
"/",
"O",
"buffer",
".",
"Warning",
"!",
"This",
"call",
"xmlOutputBufferClose",
"()",
"on",
"buf",
"which",
"is",
"not",
"available",
"after",
"this",
"call",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4486-L4493 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.saveFormatFile | def saveFormatFile(self, filename, format):
"""Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. If @format is set then the document will be
indented on output. Note that @format = 1 provide node
indenting only if xmlIndentTreeOutput = 1 or
xmlKeepBlanksDefault(0) was called """
ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
return ret | python | def saveFormatFile(self, filename, format):
"""Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. If @format is set then the document will be
indented on output. Note that @format = 1 provide node
indenting only if xmlIndentTreeOutput = 1 or
xmlKeepBlanksDefault(0) was called """
ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
return ret | [
"def",
"saveFormatFile",
"(",
"self",
",",
"filename",
",",
"format",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFormatFile",
"(",
"filename",
",",
"self",
".",
"_o",
",",
"format",
")",
"return",
"ret"
] | Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. If @format is set then the document will be
indented on output. Note that @format = 1 provide node
indenting only if xmlIndentTreeOutput = 1 or
xmlKeepBlanksDefault(0) was called | [
"Dump",
"an",
"XML",
"document",
"to",
"a",
"file",
".",
"Will",
"use",
"compression",
"if",
"compiled",
"in",
"and",
"enabled",
".",
"If"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4495-L4503 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.saveFormatFileEnc | def saveFormatFileEnc(self, filename, encoding, format):
"""Dump an XML document to a file or an URL. """
ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
return ret | python | def saveFormatFileEnc(self, filename, encoding, format):
"""Dump an XML document to a file or an URL. """
ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
return ret | [
"def",
"saveFormatFileEnc",
"(",
"self",
",",
"filename",
",",
"encoding",
",",
"format",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFormatFileEnc",
"(",
"filename",
",",
"self",
".",
"_o",
",",
"encoding",
",",
"format",
")",
"return",
"ret"
] | Dump an XML document to a file or an URL. | [
"Dump",
"an",
"XML",
"document",
"to",
"a",
"file",
"or",
"an",
"URL",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4505-L4508 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.saveFormatFileTo | def saveFormatFileTo(self, buf, encoding, format):
"""Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. """
if buf is None: buf__o = None
else: buf__o = buf._o
ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
return ret | python | def saveFormatFileTo(self, buf, encoding, format):
"""Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. """
if buf is None: buf__o = None
else: buf__o = buf._o
ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
return ret | [
"def",
"saveFormatFileTo",
"(",
"self",
",",
"buf",
",",
"encoding",
",",
"format",
")",
":",
"if",
"buf",
"is",
"None",
":",
"buf__o",
"=",
"None",
"else",
":",
"buf__o",
"=",
"buf",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFormatFileTo",
"(",
"buf__o",
",",
"self",
".",
"_o",
",",
"encoding",
",",
"format",
")",
"return",
"ret"
] | Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. | [
"Dump",
"an",
"XML",
"document",
"to",
"an",
"I",
"/",
"O",
"buffer",
".",
"Warning",
"!",
"This",
"call",
"xmlOutputBufferClose",
"()",
"on",
"buf",
"which",
"is",
"not",
"available",
"after",
"this",
"call",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4510-L4517 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.searchNs | def searchNs(self, node, 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 node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
if ret is None:raise treeError('xmlSearchNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | python | def searchNs(self, node, 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 node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
if ret is None:raise treeError('xmlSearchNs() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"searchNs",
"(",
"self",
",",
"node",
",",
"nameSpace",
")",
":",
"if",
"node",
"is",
"None",
":",
"node__o",
"=",
"None",
"else",
":",
"node__o",
"=",
"node",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSearchNs",
"(",
"self",
".",
"_o",
",",
"node__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#L4519-L4532 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.searchNsByHref | def searchNsByHref(self, node, href):
"""Search a Ns aliasing a given URI. Recurse on the parents
until it finds the defined namespace or return None
otherwise. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
if ret is None:raise treeError('xmlSearchNsByHref() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | python | def searchNsByHref(self, node, href):
"""Search a Ns aliasing a given URI. Recurse on the parents
until it finds the defined namespace or return None
otherwise. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
if ret is None:raise treeError('xmlSearchNsByHref() failed')
__tmp = xmlNs(_obj=ret)
return __tmp | [
"def",
"searchNsByHref",
"(",
"self",
",",
"node",
",",
"href",
")",
":",
"if",
"node",
"is",
"None",
":",
"node__o",
"=",
"None",
"else",
":",
"node__o",
"=",
"node",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlSearchNsByHref",
"(",
"self",
".",
"_o",
",",
"node__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#L4534-L4543 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.setListDoc | def setListDoc(self, list):
"""update all nodes in the list to point to the right document """
if list is None: list__o = None
else: list__o = list._o
libxml2mod.xmlSetListDoc(list__o, self._o) | python | def setListDoc(self, list):
"""update all nodes in the list to point to the right document """
if list is None: list__o = None
else: list__o = list._o
libxml2mod.xmlSetListDoc(list__o, self._o) | [
"def",
"setListDoc",
"(",
"self",
",",
"list",
")",
":",
"if",
"list",
"is",
"None",
":",
"list__o",
"=",
"None",
"else",
":",
"list__o",
"=",
"list",
".",
"_o",
"libxml2mod",
".",
"xmlSetListDoc",
"(",
"list__o",
",",
"self",
".",
"_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#L4550-L4554 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.setRootElement | def setRootElement(self, root):
"""Set the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). """
if root is None: root__o = None
else: root__o = root._o
ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | python | def setRootElement(self, root):
"""Set the root element of the document (doc->children is a
list containing possibly comments, PIs, etc ...). """
if root is None: root__o = None
else: root__o = root._o
ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
if ret is None:return None
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"setRootElement",
"(",
"self",
",",
"root",
")",
":",
"if",
"root",
"is",
"None",
":",
"root__o",
"=",
"None",
"else",
":",
"root__o",
"=",
"root",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlDocSetRootElement",
"(",
"self",
".",
"_o",
",",
"root__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#L4556-L4564 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.setTreeDoc | def setTreeDoc(self, tree):
"""update all nodes under the tree to point to the right
document """
if tree is None: tree__o = None
else: tree__o = tree._o
libxml2mod.xmlSetTreeDoc(tree__o, self._o) | python | def setTreeDoc(self, tree):
"""update all nodes under the tree to point to the right
document """
if tree is None: tree__o = None
else: tree__o = tree._o
libxml2mod.xmlSetTreeDoc(tree__o, self._o) | [
"def",
"setTreeDoc",
"(",
"self",
",",
"tree",
")",
":",
"if",
"tree",
"is",
"None",
":",
"tree__o",
"=",
"None",
"else",
":",
"tree__o",
"=",
"tree",
".",
"_o",
"libxml2mod",
".",
"xmlSetTreeDoc",
"(",
"tree__o",
",",
"self",
".",
"_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#L4566-L4571 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.stringGetNodeList | def stringGetNodeList(self, value):
"""Parse the value string and build the node list associated.
Should produce a flat tree with only TEXTs and ENTITY_REFs. """
ret = libxml2mod.xmlStringGetNodeList(self._o, value)
if ret is None:raise treeError('xmlStringGetNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def stringGetNodeList(self, value):
"""Parse the value string and build the node list associated.
Should produce a flat tree with only TEXTs and ENTITY_REFs. """
ret = libxml2mod.xmlStringGetNodeList(self._o, value)
if ret is None:raise treeError('xmlStringGetNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"stringGetNodeList",
"(",
"self",
",",
"value",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlStringGetNodeList",
"(",
"self",
".",
"_o",
",",
"value",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlStringGetNodeList() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Parse the value string and build the node list associated.
Should produce a flat tree with only TEXTs and ENTITY_REFs. | [
"Parse",
"the",
"value",
"string",
"and",
"build",
"the",
"node",
"list",
"associated",
".",
"Should",
"produce",
"a",
"flat",
"tree",
"with",
"only",
"TEXTs",
"and",
"ENTITY_REFs",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4573-L4579 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.stringLenGetNodeList | def stringLenGetNodeList(self, value, len):
"""Parse the value string and build the node list associated.
Should produce a flat tree with only TEXTs and ENTITY_REFs. """
ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | python | def stringLenGetNodeList(self, value, len):
"""Parse the value string and build the node list associated.
Should produce a flat tree with only TEXTs and ENTITY_REFs. """
ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"stringLenGetNodeList",
"(",
"self",
",",
"value",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlStringLenGetNodeList",
"(",
"self",
".",
"_o",
",",
"value",
",",
"len",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlStringLenGetNodeList() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Parse the value string and build the node list associated.
Should produce a flat tree with only TEXTs and ENTITY_REFs. | [
"Parse",
"the",
"value",
"string",
"and",
"build",
"the",
"node",
"list",
"associated",
".",
"Should",
"produce",
"a",
"flat",
"tree",
"with",
"only",
"TEXTs",
"and",
"ENTITY_REFs",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4581-L4587 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.ID | def ID(self, ID):
"""Search the attribute declaring the given ID """
ret = libxml2mod.xmlGetID(self._o, ID)
if ret is None:raise treeError('xmlGetID() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | python | def ID(self, ID):
"""Search the attribute declaring the given ID """
ret = libxml2mod.xmlGetID(self._o, ID)
if ret is None:raise treeError('xmlGetID() failed')
__tmp = xmlAttr(_obj=ret)
return __tmp | [
"def",
"ID",
"(",
"self",
",",
"ID",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetID",
"(",
"self",
".",
"_o",
",",
"ID",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetID() failed'",
")",
"__tmp",
"=",
"xmlAttr",
"(",
"_obj",
"=",
"ret",
")",
"return",
"__tmp"
] | Search the attribute declaring the given ID | [
"Search",
"the",
"attribute",
"declaring",
"the",
"given",
"ID"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4593-L4598 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.isID | def isID(self, elem, attr):
"""Determine whether an attribute is of type ID. In case we
have DTD(s) then this is done if DTD loading has been
requested. In the case of HTML documents parsed with the
HTML parser, then ID detection is done systematically. """
if elem is None: elem__o = None
else: elem__o = elem._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
return ret | python | def isID(self, elem, attr):
"""Determine whether an attribute is of type ID. In case we
have DTD(s) then this is done if DTD loading has been
requested. In the case of HTML documents parsed with the
HTML parser, then ID detection is done systematically. """
if elem is None: elem__o = None
else: elem__o = elem._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
return ret | [
"def",
"isID",
"(",
"self",
",",
"elem",
",",
"attr",
")",
":",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"if",
"attr",
"is",
"None",
":",
"attr__o",
"=",
"None",
"else",
":",
"attr__o",
"=",
"attr",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlIsID",
"(",
"self",
".",
"_o",
",",
"elem__o",
",",
"attr__o",
")",
"return",
"ret"
] | Determine whether an attribute is of type ID. In case we
have DTD(s) then this is done if DTD loading has been
requested. In the case of HTML documents parsed with the
HTML parser, then ID detection is done systematically. | [
"Determine",
"whether",
"an",
"attribute",
"is",
"of",
"type",
"ID",
".",
"In",
"case",
"we",
"have",
"DTD",
"(",
"s",
")",
"then",
"this",
"is",
"done",
"if",
"DTD",
"loading",
"has",
"been",
"requested",
".",
"In",
"the",
"case",
"of",
"HTML",
"documents",
"parsed",
"with",
"the",
"HTML",
"parser",
"then",
"ID",
"detection",
"is",
"done",
"systematically",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4600-L4610 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.isMixedElement | def isMixedElement(self, name):
"""Search in the DtDs whether an element accept Mixed content
(or ANY) basically if it is supposed to accept text childs """
ret = libxml2mod.xmlIsMixedElement(self._o, name)
return ret | python | def isMixedElement(self, name):
"""Search in the DtDs whether an element accept Mixed content
(or ANY) basically if it is supposed to accept text childs """
ret = libxml2mod.xmlIsMixedElement(self._o, name)
return ret | [
"def",
"isMixedElement",
"(",
"self",
",",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlIsMixedElement",
"(",
"self",
".",
"_o",
",",
"name",
")",
"return",
"ret"
] | Search in the DtDs whether an element accept Mixed content
(or ANY) basically if it is supposed to accept text childs | [
"Search",
"in",
"the",
"DtDs",
"whether",
"an",
"element",
"accept",
"Mixed",
"content",
"(",
"or",
"ANY",
")",
"basically",
"if",
"it",
"is",
"supposed",
"to",
"accept",
"text",
"childs"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4612-L4616 | train |
apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlDoc.isRef | def isRef(self, elem, attr):
"""Determine whether an attribute is of type Ref. In case we
have DTD(s) then this is simple, otherwise we use an
heuristic: name Ref (upper or lowercase). """
if elem is None: elem__o = None
else: elem__o = elem._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
return ret | python | def isRef(self, elem, attr):
"""Determine whether an attribute is of type Ref. In case we
have DTD(s) then this is simple, otherwise we use an
heuristic: name Ref (upper or lowercase). """
if elem is None: elem__o = None
else: elem__o = elem._o
if attr is None: attr__o = None
else: attr__o = attr._o
ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
return ret | [
"def",
"isRef",
"(",
"self",
",",
"elem",
",",
"attr",
")",
":",
"if",
"elem",
"is",
"None",
":",
"elem__o",
"=",
"None",
"else",
":",
"elem__o",
"=",
"elem",
".",
"_o",
"if",
"attr",
"is",
"None",
":",
"attr__o",
"=",
"None",
"else",
":",
"attr__o",
"=",
"attr",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlIsRef",
"(",
"self",
".",
"_o",
",",
"elem__o",
",",
"attr__o",
")",
"return",
"ret"
] | Determine whether an attribute is of type Ref. In case we
have DTD(s) then this is simple, otherwise we use an
heuristic: name Ref (upper or lowercase). | [
"Determine",
"whether",
"an",
"attribute",
"is",
"of",
"type",
"Ref",
".",
"In",
"case",
"we",
"have",
"DTD",
"(",
"s",
")",
"then",
"this",
"is",
"simple",
"otherwise",
"we",
"use",
"an",
"heuristic",
":",
"name",
"Ref",
"(",
"upper",
"or",
"lowercase",
")",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L4618-L4627 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.