summaryrefslogtreecommitdiffstats
path: root/Lib/xmllib.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove the xmllib module that was obsolete.Neal Norwitz2007-04-171-929/+0
|
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-18/+18
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-2/+2
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* Do not use the default namespace for attributes.Martin v. Löwis2004-05-021-16/+12
| | | | | Fixes http://bugs.debian.org/229885 Will backport to 2.3.
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-6/+6
| | | | From SF patch #852334.
* Get rid of many apply() calls.Guido van Rossum2003-02-271-1/+1
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-15/+15
|
* Add deprecation warnings for modules as documentedNeal Norwitz2002-04-101-0/+4
|
* Moved clearing of "literal" flag. The flag is set in setliteral whichSjoerd Mullender2001-03-141-1/+1
| | | | | | | can be called from a start tag handler. When the corresponding end tag is read the flag is cleared. However, it didn't get cleared when the start tag was for an empty element of the type <tag .../>. This modification fixes the problem.
* String method conversion.Eric S. Raymond2001-02-091-30/+30
|
* Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters2001-01-151-2/+2
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-2/+2
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Two changes:Sjoerd Mullender2000-12-061-8/+16
| | | | | | | - Use new Error class (subclass of RuntimeError so is backward compatible) which is raised when RuntimeError used to be raised. - Report original attribute name in error messages instead of name mangled with namespace URL.
* New method getnamespace.Sjoerd Mullender2000-08-311-0/+7
| | | | | | Since the application never gets to see the namespace abbreviation used in the XML document, but some applications may need to know them, we provide this method.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Better error handling of bad entity references. Before when an & inSjoerd Mullender2000-07-101-16/+25
| | | | | | an attribute value was not escaped, you could get two syntax errors: one about a missing semicolon and one about an unknown entity. Now you get only one about a bogus ampersand.
* 2 fixes plus one extension:Sjoerd Mullender2000-07-041-6/+6
| | | | | | | | | | - Actually count the linefeeds in a the CDATA content. - Don't call the endtag handler for an unmatched endtag (this makes the base class simpler since it doesn't have to deal with unopened endtags). - If the __init__ method is called with keyword argument translate_attribute_references=0, don't attempt to translate character and entity references in attribute values.
* typos fixed by Rob HooftJeremy Hylton2000-06-281-1/+1
|
* Sjoerd Mullender:Guido van Rossum2000-06-211-4/+4
| | | | | | | | | | | | | | | These two fixes were approved by me. Peter Kropf: There's a problem with the xmllib module when used with JPython. Specifically, the JPython re module has trouble with the () characters in strings passed into re.compile. Spiros Papadimitriou: I just downloaded xmllib.py ver. 0.3 from python.org and there seems to be a slight typo: Line 654 ("tag = self.stack[-1][0]" in parse_endtag), is indented one level more than it should be. I just thought I'd let you know...
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-041-1/+2
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Sjoerd Mullender writes:Guido van Rossum1999-08-261-30/+48
| | | | | | | | | | | """ Added some optional arguments to the XMLParser __init__ method to specify that selected non-standard constructs are to be accepted. Also removed the documentation for handle_entityrefs since it isn't used. """ The version is incremented to 0.3.
* Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:Guido van Rossum1999-06-081-1/+1
| | | | | | all processing instruction target names containing 'xml' were rejected, instead (as the standard rejects) only the name 'xml' itself (or case variants thereof).
* Fredrik Lundh fixes Sjoerd's patch...Guido van Rossum1999-02-021-7/+7
| | | | | """Sjoerd's version stores unbound methods. that's not good enough ;-) Here's an alternative implementation of fixdict."""
* Patch by Sjoerd Mullender to placate /F:Guido van Rossum1999-02-021-4/+12
| | | | | | | | | Fix leaking of instances by removing the elements variable that we created on closing the parser. The elements variable is now created in the reset() method, so that the sequence close(); reset(); ... works. Also, add the name of the entity reference that wasn't found to the error message.
* Patch by Sjoerd Mullender for better compatibility with the versionGuido van Rossum1999-02-011-0/+25
| | | | | | | | | from Python 1.5.1: If after __init__ finishes no new elements variable was created, this patch will search the instance's namespace for all attributes whose name start with start_ or end_ and put their value in a new elements instance variable.
* New test function by Sjoerd, adding -t option.Guido van Rossum1998-12-221-9/+24
|
* Sjoerd Mullender:Guido van Rossum1998-12-211-24/+34
| | | | | | | | - Fixed a bug where a syntax error was reported when a document started with white space. (White space at the start of a document is valid if there is no XML declaration.) - Improved the speed quite a bit for documents that don't make use of namespaces.
* Sjoerd Mullender writes:Guido van Rossum1998-12-181-62/+121
| | | | | | | Here is my current version of xmllib.py and the documentation. This version has some API changes with respect to the version currently in Python (also the one in 1.5.2a). This version supports XML namespaces.
* Sjoerd patches the previous patch:Guido van Rossum1998-12-081-0/+10
| | | | | In literal mode, also don't do anything about entity and character references, or about closing CDATA elements.
* Sjoerd writes:Guido van Rossum1998-12-071-1/+8
| | | | | | When literal mode is entered it should exit automatically when the matching close tag of the last unclosed open tag is encountered. This patch fixes this.
* Fixed a problem where xmllib didn't handle the tagGuido van Rossum1998-10-191-55/+60
| | | | | | | | <sometag attrib=">"> correctly. Also changed comparisons of re matches and searches into explicit comparisons with None. (Sjoerd Mullender)
* Sjoerd's latest.Guido van Rossum1998-04-031-117/+195
|
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-456/+456
|
* New version of xmllib from Sjoerd.Guido van Rossum1998-01-291-57/+162
| | | | | | | | | | | | | The main incompatibility is that the error reporting method is now called as parser.syntax_error(msg) instead of parser.syntax_error(lineno, msg) This new version also has some code to deal with the <?xml?> and <!DOCTYPE> tags at the start of an XML document. The documentation has been updated, and a small test module has been created.
* Fixed case sensitivity of attributes (they are case *sensitive*).Guido van Rossum1997-11-181-12/+8
|
* Sjoerd Mullender's xml parser (based on sgmllib, somewhat).Guido van Rossum1997-11-181-0/+568