summaryrefslogtreecommitdiffstats
path: root/Lib/xml
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 83152 via svnmerge fromAndrew M. Kuchling2010-07-251-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83152 | andrew.kuchling | 2010-07-25 19:38:47 -0400 (Sun, 25 Jul 2010) | 1 line #777884: make .normalize() do nothing for childless nodes, instead of raising an exception ........
* Issue #6472: The xml.etree package is updated to ElementTree 1.3. The ↵Florent Xicluna2010-03-114-545/+1038
| | | | cElementTree module is updated too.
* issue#6442 use in operator instead of has_keyJack Diederich2010-02-231-1/+1
|
* Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">")Antoine Pitrou2010-02-091-2/+2
| | | | | | in XML processing instructions and comments. These raw characters are allowed by the XML specification, and are necessary when outputting e.g. PHP code in a processing instruction. Patch by Neil Muller.
* replace has_key with 'in' operatorBenjamin Peterson2009-10-094-8/+8
|
* death to old CVS keywordBenjamin Peterson2009-10-091-6/+0
|
* #4490 Fix sample code run by "python -m xml.sax.xmlreader"Amaury Forgeot d'Arc2009-06-221-3/+3
|
* Issue #2170: refactored xml.dom.minidom.normalize, increasing bothR. David Murray2009-04-091-18/+11
| | | | its clarity and its speed.
* Issue 2235: Py3k warnings are now emitted for classes that will no longer ↵Nick Coghlan2008-08-111-0/+1
| | | | inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
* Remove dict.has_key() usage in xml.sax to silence warnings under -3.Brett Cannon2008-08-042-4/+4
|
* Remove dict.has_key() usage in xml.dom.minidom to silence warnings whileBrett Cannon2008-08-041-4/+4
| | | | running under -3.
* Issue #1390: Raise ValueError in toxml when an invalid comment wouldMartin v. Löwis2008-05-231-0/+2
| | | | otherwise be produced.
* #2503 make singletons compared with "is" not == or !=Benjamin Peterson2008-03-291-1/+1
| | | | Thanks to Wummel for the patch
* #1433694: minidom's .normalize() failed to set .nextSibling for last element.Andrew M. Kuchling2008-02-231-0/+2
| | | | Fix by Malte Helmert
* Issue 1290. CharacterData.__repr__ was constructing a stringFacundo Batista2007-10-241-1/+1
| | | | in response that keeped having a non-ascii character.
* Patch 1463026: Support default namespace in XMLGenerator.Martin v. Löwis2007-02-121-16/+19
| | | | Fixes #847665. Will backport.
* expunge the xmlcore changes:Fred Drake2006-07-2922-0/+7402
| | | | | | | | | | | | | | | | | | | 41667, 41668 - initial switch to xmlcore 47044 - mention of xmlcore in What's New 50687 - mention of xmlcore in the library reference re-apply xmlcore changes to xml: 41674 - line ending changes (re-applied manually), directory props 41677 - add cElementTree wrapper 41678 - PSF licensing for etree 41812 - whitespace normalization 42724 - fix svn:eol-style settings 43681, 43682 - remove Python version-compatibility cruft from minidom 46773 - fix encoding of \r\n\t in attr values in saxutils 47269 - added XMLParser alias for cElementTree compatibility additional tests were added in Lib/test/test_sax.py that failed with the xmlcore changes; these relate to SF bugs #1511497, #1513611
* move the xml package implementation to xmlcore, and adjust the tests toFred Drake2005-12-1421-7462/+0
| | | | | test that package, not the xmlcore/PyXML switcheroo fiasco in the xml module/package
* r1077@spiff: Fredrik | 2005-12-12 22:58:44 +0100Fredrik Lundh2005-12-121-0/+1
| | | | | make sure xml.etree can be used even if PyXML is present (solution proposed by Philip J. Eby)
* r1068@spiff: Fredrik | 2005-12-12 19:50:30 +0100Fredrik Lundh2005-12-121-2/+6
| | | | assorted xml.etree tweaks
* added ElementTree core components to xml.etreeFredrik Lundh2005-12-124-0/+1621
|
* [Bug #1281032] Pass encoding from the input source to pyexpat's ParserCreate()Andrew M. Kuchling2005-12-041-2/+3
|
* [Patch #1094164] replaceChild(x,x) ends up removing x of the tree. Add fix ↵Andrew M. Kuchling2005-11-221-2/+2
| | | | from Felix Rabe and a test case
* bug [ 1262320 ] minidom.py alternate newl support is brokenGeorg Brandl2005-08-251-6/+6
|
* fix XMLFilterBase.resolveEntity() so the caller gets the resultFred Drake2005-02-031-1/+1
| | | | (PyXML bug #1112052)
* Fix typo in comment.Walter Dörwald2004-11-251-1/+1
|
* when only using half of the return value of os.path.split(), useFred Drake2004-10-201-1/+1
| | | | os.path.dirname() or os.path.basename() instead
* SF bug #902037: relative on-disk SYSTEM id handling is incorrectRaymond Hettinger2004-10-201-4/+5
| | | | | | (Contributed by Bob Ippolito.) backport candidate.
* Require minimally PyXML 0.8.4.Martin v. Löwis2004-10-131-1/+1
|
* Whitespace normalization, via reindent.py.Tim Peters2004-07-181-2/+2
|
* fix documentation for ContentHandler.ignorableWhitespace()Fred Drake2004-05-061-4/+1
| | | | (closes SF bug #881707)
* Consider output encoding in XMLGenerator. Fixes #938076.Martin v. Löwis2004-05-061-13/+28
| | | | Backported to 2.3.
* Properly delegate startElementNS in saxutils.XMLFilterBase. Fixes #936637.Martin v. Löwis2004-05-061-1/+1
| | | | Backported to 2.3.
* Swap public and system ID in start_doctype_decl. Fixes #780300.Martin v. Löwis2004-05-061-1/+1
|
* commit the portion of PyXML patch #919008 that is relevant to theFred Drake2004-03-201-2/+7
| | | | | | | standard library: str() of xml.sax.SAXParseException should not fail if the line and/or column number returned by the locator are None (tests added)
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-123-4/+4
| | | | From SF patch #852334.
* Add missing self. before curNode. This may need to be committedNeal Norwitz2003-06-291-1/+1
| | | | to PyXML, I'm not sure of the procedure.
* Whitespace normalization.Tim Peters2003-04-244-5/+5
|
* SF patch #701494: more apply removalsRaymond Hettinger2003-04-061-2/+2
|
* Get rid of many apply() calls.Guido van Rossum2003-02-272-2/+2
|
* SF patch 672098: Three __contains__ implementationsRaymond Hettinger2003-01-301-0/+3
| | | | Contributed by Jp Calderone.
* Require PyXML 0.8.2.Martin v. Löwis2003-01-261-1/+1
|
* Merge with PyXML 1.3:Martin v. Löwis2003-01-261-0/+23
| | | | | | | Add support for the DOM Level 3 (draft) DOMImplementationSource interface to the xml.dom and xml.dom.minidom modules. Note API issue: the draft spec says to return null when there is no suitable implementation, while the Python getDOMImplementation() function raises ImportError (minor).
* Merge with PyXML 1.34: Correct typo. Fixes #674700.Martin v. Löwis2003-01-261-1/+1
|
* Merge with PyXML 1.82:Martin v. Löwis2003-01-261-8/+12
| | | | | Correct various typos. Fixes #674700. Set newly created attribute via setNamedItem.
* Import UserDataHandler from PyXML.Martin v. Löwis2003-01-251-0/+9
|
* Import NodeFilter from DOM2 Traversal/Range.Martin v. Löwis2003-01-251-0/+27
|
* Merge with PyXML 1.28:Martin v. Löwis2003-01-251-22/+71
| | | | | | | | | | | | | | | | | Wrap a lot of long lines. Clean up a handler for expat.error. If a lexical handler is set, make sure we call the startDTD() and endDTD(). If the lexical handler is unset (by setting it to None), remove the handlers from the underlying pyexpat parser object. Closes SF bug #485584. In namespaces mode, make sure we set up the qnames dictionary correctly for the AttributesNSImpl instance passed to the start-element-handler. Closes SF bug #563399. Support skippedEntity. Fixes #665486.
* Import from PyXML 1.10.Martin v. Löwis2003-01-251-0/+388
|
* Merge with PyXML 1.80:Martin v. Löwis2003-01-251-327/+1287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basic minidom changes to support the new higher-performance builder, as described: http://mail.python.org/pipermail/xml-sig/2002-February/007217.html Use True/False where appropriate. isSupported(): Implemented from DOM Level 2. Support a variety of things from the DOM Level 3 draft, integrate with the xml.dom.xmlbuilder module for the new Document and DOMImplementation methods. Support the NODE_CLONED callback for the UserDataHandler set using setUserData(). Add Entity and Notation nodes to minidom. Add __getitem__() to ReadOnlySequentialNamedNodeMap to match NamedNodeMap. TupleType was used without being defined; rename to _TupleType and define. Add magic so that instances of the NamedNodeMap (and its read-only cousin) take a bit less memory in the new-style world of Python 2.2/2.3. Now, the assignments to __slots__ actually work. ;-) Add support for the Text.wholeText attribute. Document.createCDATASection(): Do not pass unsupported arg to CDATASection constructor. Implemented Text.replaceWholeText(). Updated minidom interfaces to work better with current 4Suite XPath and Xslt. * Added childNodes to class Attr * Added localName and prefix to all Nodes * Added specified on class Attr * Changed DOMImplementation.createDocument to all creating a document with no document element and a Null doctype * Changed CharacterData__setattr__ to keep nodeValue and data in synch * fixed typo of ownerDoc in createDocumentFragment * Changed Comment to inherit from CharacterData * Allowed mutation of name on PIs * Added importNode and rewrote cloneNode so both use same code base * Changed EmptyNodeList to be a list not a tuple Use a table-driven DOMImplementation.hasFeature(). Shorten lines longer than 80 characters. Rename CloneNode to _clone_node (better naming consistency within the module). When defining localName as a property, the defproperty() call is needed for each class that defined _get_localName(), otherwise only the first version is used for Python 2.2 and newer. Node.insertBefore(): When the reference node is not found, raise the exception defined by the DOM specification. Attr._set_value(): Added setter that does the right thing. Childless.removeChild(): Raise the exception defined by the specification, even though it seem less than intuitive. _clone_node(): Access nodeType constants so we actually find them. Add support for document fragments. Node.removeChild(), .replaceChild(): Fix exception raised when a reference node is not found. CharacterData._set_data(): Update the nodeValue attribute as well as the data attribute. Entity.attributes, .childNodes: Added these attributes. Document.removeChild(): Raise the right exception when the node being removed is not a child of this node. Element.removeAttributeNode(): Raise the right exception when the node isn't present on this element. Don't unlink the node unless it is present. Added support for the following methods and accessors: Node._get_childNodes(), Attr._get_specified(), Attr._set_prefix(), NamedNodeMap.has_key(), .getNamedItem(), .getNamedItemNS(), .removeNamedItem(), .removeNamedItemNS(), ProcessingInstruction._get_data(), ._get_target(), ._set_data(), ._set_target(), CharacterData.__len__(), Document.getElementById(). Add many more of the _get_*() accessors. Convert internal helpers to use a more consistent naming convention. Remove unused definition of _nssplit(); there can be only one! Move the Identified mixin up so it can be used by one more class. Remove comment about NamedNodeMap.__getitem__(); the API won't be changing now! Way too late for that. Preliminary support for getElementById() for DOMs built with xml.dom.expatbuilder. Not necessarily very efficient, but it works, and is still fast for Document instances that do not have the ID information. DOMImplementation.createDocument(): Don't forget to add the DocumentType node to the tree. This appearantly was lost in the previous release. DocumentType.writexml(): New function. Implement the final determination on the behaviors of importNode() and cloneNode() with regard to Document and DocumentType nodes. When cloning and importing, call the UserDataHandler with the right operation, not just blindly use NODE_CLONED. parse(), parseString(): When called with parser=None, use xml.dom.expatbuilder instead of xml.dom.pulldom, to get a performance boost (the main point of expatbuilder). Fix for calling parse / parseString with a given parser instance; the else-paths were ignored when refactoring the function signatures; pychecker found that error instantly, BTW (hint, hint) Added pickle support for NamedNodeMap, ReadOnlySequentialNamedNodeMap, and ElementInfo. Closes SF bug #609641. In _clone_node for elements, fixed arguments for getAttributeNodeNS At least make sure the DOM API won't allow you to modify the child node list of an entity node (since entity ndoes are supposed to be readonly). Add support for the DOM Level 3 (draft) DOMImplementationSource interface to the xml.dom and xml.dom.minidom modules. Note API issue: the draft spec says to return null when there is no suitable implementation, while the Python getDOMImplementation() function raises ImportError (minor). Implement the DOM Level 3 Attr.isId property. Refactor the lookup of the ElementInfo objects. Implement the schemaType attribute for Element and Attr nodes. Defined by the (draft) DOM Level 3 specification. getElementById(): Support caching of IDs found. This implementation is sufficient for DOM Level 2 compliance, but additional changes will be needed to support the setIdAttribute() and setIdAttributeNS() methods in DOM Level 3. Add support for Text.isWhitespaceInElementContent (draft Level 3). NamedNodeMap.removeNamedItem(), .removeNamedItemNS(): Pass the new tests: Return the removed node, or raise NotFoundErr if there was no matching node. When changing attributes via a NamedNodeMap, update the ID-cache appropriately. Added support for the DOM Level 3 (draft) Element.setIdAttribute*() methods. setAttributeNode(): Be more careful about not calling removeAttributeNode() twice for a single node. Do more to avoid creating new Attr nodes, so that attributes do not lose their ID-ness when set using setIdAttribute*(). Work harder to avoid calls to Attr.__setattr__() and CharacterData.__setattr__(). Attr.unlink(): Implement everything directly instead of calling to the base class, which does several things that aren't needed for Attr nodes. Change some remaining assignments that caused __setattr__() to be called when it can be avoided. expatbuilder can now perform DOM construction without __setattr__() interferance in common cases. Remove unused _make_parent_nodes logic.