summaryrefslogtreecommitdiff
path: root/python/libxml.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typosNick Wellnhofer2020-03-081-1/+1
| | | | Resolves #133.
* Add methods for python3 iteratorRon Angeles2014-10-031-2/+4
| | | | | | | xmlCoreDepthFirstItertor and xmlCoreBreadthFirstItertr only implement a python2-compatible iterator interface. The next() method has been changed to __next__(). An alias has been defined to keep python2 compatibility.
* Fix python bindings with versions older than 2.7Daniel Veillard2013-04-021-1/+3
| | | | | Need fixing on the Capsule usage, the lack of PyBytes, lack of io module and the way to access exception details.
* Fix tree iterators broken by 2to3 scriptDaniel Veillard2013-04-011-4/+4
|
* A few more fixes for python 3 affecting libxml2.pyDaniel Veillard2013-03-301-7/+33
| | | | need a few changes to the generator and the libxml.py stub
* First pass at starting porting to python3Daniel Veillard2013-03-301-15/+16
|
* Python binding for xmlRegisterInputCallbackAlexey Neyman2013-02-251-1/+25
| | | | | | | | | | | | It is possible to make xmlIO handle any protocol by means of xmlRegisterInputCallback(). However, that function is currently only available in C API. So, the natural solution seems to be implementing Python bindings for the xmlRegisterInputCallback. * python/generator.py: skip xmlPopInputCallbacks * python/libxml.c python/libxml.py python/libxml_wrap.h: implement the wrappers * python/tests/input_callback.py python/tests/Makefile.am: also add a test case
* Python bindings: DOM casts everything to xmlNodeAlexey Neyman2013-02-211-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed another issue with Python bindings of libxml: the access methods do not cast the pointers to specific classes such as xmlDtd, xmlEntityDecl, etc. For example, with the following document: <?xml version="1.0"?> <!DOCTYPE root [<!ELEMENT root EMPTY>]> <root/> the following script: import libxml2 doc = libxml2.readFile("c.xml", None, libxml2.XML_PARSE_DTDLOAD) print repr(doc.children) prints: <xmlNode (root) object at 0xb74963ec> With properly cast nodes, it outputs the following: <xmlDtd (root) object at 0xb746352c> The latter object (xmlDtd) enables one to use DTD-specific methods such as debugDumpDTD(), copyDTD(), and so on.
* 544910 typo: "renciliateNs"Leonid Evdokimov2009-08-241-1/+1
| | | | * python/libxml.py: typo on a comment
* fixed tab problem with patch from Andreas Hanke (bug #408626)William M. Brack2007-02-161-8/+8
| | | | | | * python/libxml.py: fixed tab problem with patch from Andreas Hanke (bug #408626) svn path=/trunk/; revision=3586
* apparently id() sometimes generate negative values and %X outputs -XXXXDaniel Veillard2006-12-141-0/+10
| | | | | | * python/generator.py python/libxml.py: apparently id() sometimes generate negative values and %X outputs -XXXX :-( Daniel
* applied patch from Ross Reedstrom, Brian West and Stefan Anca to addDaniel Veillard2006-10-101-3/+10
| | | | | | * python/libxml.py python/types.c: applied patch from Ross Reedstrom, Brian West and Stefan Anca to add XPointer suport to the Python bindings Daniel
* Added code submitted by Andreas Pakulat to provide node equality,William M. Brack2006-06-261-0/+17
| | | | | | | | * python/libxml.c, python/libxml.py, python/tests/compareNodes.py, python/tests/Makefile.am: Added code submitted by Andreas Pakulat to provide node equality, inequality and hash functions, plus a single test program to check the functions (bugs 345779 + 345961).
* remove a tab, as pointed out on IRC DanielDaniel Veillard2006-02-271-1/+1
| | | | | * python/libxml2.py: remove a tab, as pointed out on IRC Daniel
* remove warnings to stdout patch from Nic Ferrier DanielDaniel Veillard2005-10-271-1/+2
| | | | | * python/libxml.py: remove warnings to stdout patch from Nic Ferrier Daniel
* applied patch from Brent Hendricks adding namespace removal at the pythonDaniel Veillard2005-04-121-0/+21
| | | | | | | | * python/libxml.c python/libxml.py: applied patch from Brent Hendricks adding namespace removal at the python level #300209 * python/tests/Makefile.am python/tests/nsdel.py: added the regression test Daniel
* another patch from Brent Hendricks to add new handlers with the variousDaniel Veillard2005-03-301-0/+39
| | | | | | | | | * python/generator.py python/libxml.py: another patch from Brent Hendricks to add new handlers with the various validity contexts * python/tests/Makefile.am python/tests/validDTD.py python/tests/validRNG.py python/tests/validSchemas.py: also added the regression tests he provided Daniel
* make __str__ call serialize() on nodes, c.f. bug #157872 DanielDaniel Veillard2005-01-151-0/+2
| | | | | | * python/libxml.py: make __str__ call serialize() on nodes, c.f. bug #157872 Daniel
* applied patch from Malcolm Tredinnick fixing python exception hierarchyDaniel Veillard2004-09-281-4/+7
| | | | | | * python/libxml.py: applied patch from Malcolm Tredinnick fixing python exception hierarchy #139824 Daniel
* Dodji pointed out a bug in xmlGetNodePath() applied patch from Albert ChinDaniel Veillard2004-08-141-3/+3
| | | | | | | | | | | | | | | * tree.c: Dodji pointed out a bug in xmlGetNodePath() * xmlcatalog.c: applied patch from Albert Chin to add a --no-super-update option to xmlcatalog see #145461 and another patch also from Albert Chin to not crash on -sgml --del without args see #145462 * Makefile.am: applied another patch from Albert Chin to fix a problem with diff on Solaris #145511 * xmlstring.c: fix xmlCheckUTF8() according to the suggestion in bug #148115 * python/libxml.py: apply fix from Marc-Antoine Parent about the errors in libxml(2).py on the node wrapper #135547 Daniel
* ran 'expand' on the file to get rid of mixture of tabs and spaces (bugWilliam M. Brack2004-07-121-13/+13
| | | | | * python/libxml.py: ran 'expand' on the file to get rid of mixture of tabs and spaces (bug 147424)
* applied patch from Stéphane Bidoul to fix some Python bindingsDaniel Veillard2004-07-011-0/+5
| | | | | | | | | | * python/libxml.c python/generator.py python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt: applied patch from Stéphane Bidoul to fix some Python bindings initialization, then had to change the parserCleanup() to handle memory released there. * xmlmemory.c: added more debugging comments. Daniel
* applied patch from Anthony Carrico providing Python bindings for theDaniel Veillard2004-03-091-0/+42
| | | | | | * python/libxml.c python/libxml.py: applied patch from Anthony Carrico providing Python bindings for the Canonicalization C14N support. Daniel
* fixed bug #129489, propagation of parsing flags in entities. improved theDaniel Veillard2003-12-211-0/+1
| | | | | | | * parser.c: fixed bug #129489, propagation of parsing flags in entities. * parser.c xmlreader.c: improved the comments of parsing options Daniel
* tried to fix the problems reported in bug #126735 fixed again some problemDaniel Veillard2003-12-081-15/+19
| | | | | | | | | | * python/libxml.py: tried to fix the problems reported in bug #126735 * xpath.c SAX2.c error.c parser.c valid.c include/libxml/xmlerror.h: fixed again some problem trying to use the structured error handlers, c.f. bug #126735 * result/VC/ElementValid: tiny change due to the fix Daniel
* oops forgot to modify/commit the new code. DanielDaniel Veillard2003-12-041-4/+24
| | | | | * python/libxml.py: oops forgot to modify/commit the new code. Daniel
* fixed warning message from IRIX (bug 125182) removed tabs, replaced withWilliam M. Brack2003-10-271-104/+104
| | | | | | * xmllint.c: fixed warning message from IRIX (bug 125182) * python/libxml.py: removed tabs, replaced with spaces (bug 125572)
* applied patch from Brent M Hendricks adding binding for xmlCatalogAddLocalDaniel Veillard2003-04-231-0/+5
| | | | | | * python/libxml.c python/libxml.py: applied patch from Brent M Hendricks adding binding for xmlCatalogAddLocal Daniel
* patch from Stéphane Bidoul for better per context error message APIsDaniel Veillard2003-01-201-15/+35
| | | | | | | | | | * xmlreader.c python/drv_libxml2.py python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h python/types.c: patch from Stéphane Bidoul for better per context error message APIs * python/tests/ctxterror.py python/tests/readererr.py: update of the tests Daniel
* applied a patch from Stéphane Bidoul to allow per XMLtextReader error andDaniel Veillard2003-01-161-0/+30
| | | | | | | | | | * xmlreader.c include/libxml/xmlreader.h python/generator.py python/libxml.c python/libxml.py win32/libxml2.def.src: applied a patch from Stéphane Bidoul to allow per XMLtextReader error and warning handling * python/tests/Makefile.am python/tests/readererr.py: adding the specific regression test Daniel
* applied and fixed a patch from Stephane Bibould to provide per parserDaniel Veillard2003-01-141-0/+19
| | | | | | | | | | * python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h python/types.c: applied and fixed a patch from Stephane Bibould to provide per parser error handlers at the Python level. * python/tests/Makefile.am python/tests/ctxterror.py: added a regression test for it. Daniel
* fixed bug #102181 by applying the suggested change and fixing theDaniel Veillard2003-01-101-1/+21
| | | | | | | * python/libxml.py python/libxml.c python/libxml2-python-api.xml: fixed bug #102181 by applying the suggested change and fixing the generation/registration problem. Daniel
* integrated the Python 2.2 optimizations from Hannu Krosing, whileDaniel Veillard2003-01-041-63/+149
| | | | | | | * python/libxml.py: integrated the Python 2.2 optimizations from Hannu Krosing, while maintaining compatibility with 1.5 and 2.1 Daniel
* a bit of cleanup small fix more work on the XmlTextReader tutorial a fewDaniel Veillard2003-01-041-6/+1
| | | | | | | | * xmllint.c: a bit of cleanup * xmlreader.c: small fix * doc/xmlreader.html: more work on the XmlTextReader tutorial * python/libxml.py: a few fixes pointed out by Hannu Krosing Daniel
* extended the XmlTextReader API a bit, addding accessors for the currentDaniel Veillard2002-12-281-0/+1
| | | | | | | | | | | | * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: extended the XmlTextReader API a bit, addding accessors for the current doc and node, and an entity substitution mode for the parser. * python/libxml.py python/libxml2class.txt: related updates * python/tests/Makefile.am python/tests/reader.py python/tests/reader2.py python/tests/reader3.py: updated a bit the old tests and added a new one to test the entities handling Daniel
* added a few predefined xmlTextReader parser configuration values. DanielDaniel Veillard2002-12-271-0/+7
| | | | | | * python/libxml.py: added a few predefined xmlTextReader parser configuration values. Daniel
* updated the python bindings, added code for easier File I/O, and theDaniel Veillard2002-09-121-0/+68
| | | | | | | | | | | | | * python/generator.py python/libxml.c python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: updated the python bindings, added code for easier File I/O, and the ability to define a resolver from Python fixing bug #91635 * python/tests/Makefile.am python/tests/inbuf.py python/tests/outbuf.py python/tests/pushSAXhtml.py python/tests/resolver.py python/tests/serialize.py: updated and augmented the set of Python tests. Daniel
* Fixed serialize and saveTo comment, DanielDaniel Veillard2002-05-291-1/+1
|
* fixed xmlReconciliateNs(), added a Python test/example for inter-documentDaniel Veillard2002-03-071-3/+20
| | | | | | | | | * tree.c python/tests/Makefile.am python/tests/cutnpaste.py: fixed xmlReconciliateNs(), added a Python test/example for inter-document cut'n paste * python/libxml.py: fixed node.doc on document nodes and added xpathEval() onto node objects Daniel
* fix bug #72490 added methods serialize() and saveTo() to all nodeDaniel Veillard2002-03-061-1/+12
| | | | | | | * tree.c: fix bug #72490 * python/libxml.c python/libxml.py: added methods serialize() and saveTo() to all node elements. Daniel
* make sure SAX endDocument is always called as this could result in aDaniel Veillard2002-03-051-0/+128
| | | | | | | | | | | | * parser.c: make sure SAX endDocument is always called as this could result in a Python memory leak otherwise (it's used to decrement ref-counting) * python/generator.py python/libxml.c python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt python/tests/error.py python/tests/xpath.py: implemented the suggestions made by Gary Benson and extended the tests to match it. Daniel
* couple of bug fixes DanielDaniel Veillard2002-02-121-0/+1
| | | | | * python/libxml.c: couple of bug fixes Daniel
* removed tabs and used spaces. DanielDaniel Veillard2002-02-111-84/+84
| | | | | * python/*.py: removed tabs and used spaces. Daniel
* Justin Fletcher found some parts of the code needing cleanup Fixed theDaniel Veillard2002-02-091-26/+26
| | | | | | | | | | * parserInternals.c valid.c: Justin Fletcher found some parts of the code needing cleanup * libxml.spec.in python/Makefile.am python/generator.py python/libxml.c python/libxml.py: Fixed the python Makefiles corrected a bug showing up on ia64, changed the name of the python internal module too Daniel
* cleanup added class for parser context, added first cut for push modeDaniel Veillard2002-02-031-8/+0
| | | | | | | | | | | | * python/Makefile.am python/types.c: cleanup * python/libxml.c python/libxml.py python/libxml_wrap.h python/generator.py python/libxml2-python-api.xml python/libxml2class.txt: added class for parser context, added first cut for push mode support. Added a framework to generate accessors functions. * python/tests/Makefile.am python/tests/push.py: added a push test Daniel
* fixed a small bug a bit of cleanup. DanielDaniel Veillard2002-02-021-1/+9
| | | | | | * python/Makefile.am python/TODO python/libxml.py: fixed a small bug a bit of cleanup. Daniel
* fixed a stupid bug when renaming a function DanielDaniel Veillard2002-02-021-1/+1
| | | | | | * python/libxml.c python/libxml.py: fixed a stupid bug when renaming a function Daniel
* more work, now able to extend the XPath interpreter with functions writtenDaniel Veillard2002-02-011-0/+6
| | | | | | | * python/Makefile.am python/generator.py python/libxml.c python/libxml.py: more work, now able to extend the XPath interpreter with functions written in python. Daniel
* minor optimization more work on the python bindings, they now supportDaniel Veillard2002-01-311-2/+51
| | | | | | | | * xpath.c: minor optimization * python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h: more work on the python bindings, they now support XPath and there is no evident leak Daniel
* more work on the python bindings generator. DanielDaniel Veillard2002-01-301-21/+4
| | | | | | * python/generator.py python/libxml.c python/libxml.py: more work on the python bindings generator. Daniel