summaryrefslogtreecommitdiff
path: root/src/lxml/public-api.pxi
diff options
context:
space:
mode:
authorAl <albarrentine@gmail.com>2017-04-12 23:08:30 -0400
committerAl <albarrentine@gmail.com>2017-04-14 04:23:42 -0400
commite55b098fa2f8bca2dc21705d518936151cbda412 (patch)
treeb138e0f3748ce7d811a3ceff36c770ac69751f08 /src/lxml/public-api.pxi
parent41ebfd3332410711e64bff24b460f1ac82a4c7f0 (diff)
downloadpython-lxml-e55b098fa2f8bca2dc21705d518936151cbda412.tar.gz
add documentFactory to public header
Diffstat (limited to 'src/lxml/public-api.pxi')
-rw-r--r--src/lxml/public-api.pxi5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lxml/public-api.pxi b/src/lxml/public-api.pxi
index 128e25d3..f56c162a 100644
--- a/src/lxml/public-api.pxi
+++ b/src/lxml/public-api.pxi
@@ -17,6 +17,11 @@ cdef public api _ElementTree newElementTree(_Element context_node,
_assertValidNode(context_node)
return _newElementTree(context_node._doc, context_node, subclass)
+cdef public api _Document documentFactory(xmlDoc* c_doc, parser):
+ if c_doc is NULL:
+ raise TypeError
+ return _documentFactory(c_doc, parser)
+
cdef public api _Element elementFactory(_Document doc, xmlNode* c_node):
if c_node is NULL or doc is None:
raise TypeError