Commit Graph

71 Commits

Author SHA1 Message Date
Georg Brandl 834a73bf4f merge with 3.3 2013-10-06 09:23:19 +02:00
Georg Brandl bdaee3ac95 Fix: Element.text is an attribute, not a method (report by Cameron Laird on docs@) 2013-10-06 09:23:03 +02:00
Nick Coghlan 4cc2afa0ec Close #18990: remove root attribute from XMLPullParser
- this was an internal implementation detail for iterparse
- this has been changed to use a new private method instead
- XMLPullParser.close docs are now more explicit about not
  returning a root element and instead direct users towards
  read_events
- also added missing docstrings and clarified some details
  related to exactly *when* events are consumed from the
  internal queue

(Initial patch by Stefan Behnel)
2013-09-28 23:50:35 +10:00
Eli Bendersky 2c68e300e5 Fix XMLPullParser documentation to say "non-blocking" instead of "asynchronous".
The latter is more ambiguous.

Related to issue #17741
2013-08-31 07:37:23 -07:00
Eli Bendersky b586934f0e Issue #17741: Rename IncrementalParser and its methods.
The new names are hopefully more descriptive and consistent. If you feel you
don't agree with this change, *please* read issue 17741 first - there's a lot of
discussion in there.
2013-08-30 05:51:20 -07:00
Serhiy Storchaka a8c2a8aa8d Issue #18760: Improved cross-references in the xml package. 2013-08-29 10:29:30 +03:00
Serhiy Storchaka 15e6590774 Issue #18760: Improved cross-references in the xml package. 2013-08-29 10:28:44 +03:00
Eli Bendersky c020e7f8cb Merge doc fix from 3.3 2013-08-25 15:30:39 -07:00
Eli Bendersky bf8ab77f94 Update XMLParser.close documentation and fix formatting.
Using ``method`` markup because the method is on a callback object, not an
explicitly documented method. :meth: markup creates links within the current
class which is incorrect.

In addition, indent the paragraph correctly.
2013-08-25 15:27:36 -07:00
Ezio Melotti 74eba65fb6 Fix markup in elementtree docs. 2013-08-26 01:05:57 +03:00
Eli Bendersky bfd78370a5 Clarify the documentation of XMLParser.close
The return value of close() is not always a toplevel element. It depends on
what the underlying target returns. By default, TreeBuilder returns the
toplevel document element.
2013-08-24 15:11:44 -07:00
Eli Bendersky c4216ab92b Issue #17902: Clarify doc of ElementTree.iterparse and IncrementalParser
Based on patch by Aaron Oakley
2013-08-03 18:55:10 -07:00
Eli Bendersky ca97fd3053 Issue #17902: Clarify doc of ElementTree.iterparse 2013-08-03 18:52:32 -07:00
Eli Bendersky fb625448f8 Clarify docs too: events can be any sequence (not that the C code supports it) 2013-05-19 09:09:24 -07:00
Eli Bendersky 3bdead1113 Add some documentation for IncrementalParesr 2013-04-20 09:06:27 -07:00
Eli Bendersky 10e0af8493 Fix trailing whitespace 2013-04-20 05:54:29 -07:00
Eli Bendersky ab2a76c8a8 Update ET documentation reprhasing the mention of the new IncrementalParser in
the doc for iterparse.
2013-04-20 05:53:50 -07:00
Antoine Pitrou 5b235d0923 Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for non-blocking applications. 2013-04-18 19:37:06 +02:00
Georg Brandl 1bab7134a8 Merge with 3.3. 2013-03-28 13:28:55 +01:00
Georg Brandl 44ea77bd81 Closes #4159: add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text. 2013-03-28 13:28:44 +01:00
Christian Heimes 9869e60dc2 Issue 17538: Document XML vulnerabilties 2013-03-26 17:48:28 +01:00
Christian Heimes 768f6a5360 Issue 17538: Document XML vulnerabilties 2013-03-26 17:47:23 +01:00
Christian Heimes 7380a67267 Issue 17538: Document XML vulnerabilties 2013-03-26 17:35:55 +01:00
Eli Bendersky 7343cb0790 Issue #11367: fix documentation of some find* methods in ElementTree 2013-03-12 06:01:22 -07:00
Serhiy Storchaka 9e189f0a28 Cleanup the docs ElementTree a bit. 2013-01-13 22:24:27 +02:00
Serhiy Storchaka f1b045f417 Describe the default_namespace parameter of ElemetTree.write. 2013-01-13 22:04:43 +02:00
Serhiy Storchaka 03530b980e Describe the default_namespace parameter of ElemetTree.write. 2013-01-13 21:58:04 +02:00
Eli Bendersky e9af827fb1 Cleanup the docs ElementTree a bit and describe the default_namespace parameter. In the code, replace the old outdated Doxygen-ish comment above ElementTree.write by a proper docstring. 2013-01-13 06:27:51 -08:00
Eli Bendersky a9a2ef5550 Close #14377: Add a new parameter to ElementTree.write and some module-level
serialization functions - short_empty_elements. It controls how elements
without contents are emitted.

Patch by Serhiy Storchaka. Feature initially proposed by Ariel Poliak.
2013-01-13 06:04:43 -08:00
Eli Bendersky 831893a68e Issue #16082: clarify the documentation of tostring[list] saying that it may generate a bytestring, depending on the given encoding. 2012-10-09 07:18:16 -07:00
Eli Bendersky 323a43af06 Issue #12322: clarify xpath reference for cases where the path reaches ancestors of the start element. Also add missing markup for a None. Thanks to patrick vrijlandt and Mike Hoy for the report and initial patches. 2012-10-09 06:46:33 -07:00
Eli Bendersky a1b0f6d9be Issue #15586: fix prompts in some documentation examples 2012-08-18 05:42:22 +03:00
Eli Bendersky 3115f0d14b Issue #15586: typo fix. This commit is accompanied by an apology for all Liechtensteiners out there, and a thanks to Eric Araujo for noticing. 2012-08-15 14:26:30 +03:00
Eli Bendersky 0f4e934174 Issue #15586: add some examples to ElementTree documentation. Patch by Daniel Ellis. 2012-08-14 07:19:33 +03:00
Eli Bendersky f96cf911a0 Issue #9458: clarify the documentation of ElementTree.write with regards to the type of the stream expected for a given encoding 2012-07-15 06:19:44 +03:00
Eli Bendersky 00f402bfcb Close #1767933: Badly formed XML using etree and utf-16. Patch by Serhiy Storchaka, with some minor fixes by me 2012-07-15 06:02:22 +03:00
Eli Bendersky 48c50bf4c8 Clarify ET.iterparse documentation - this function is not supported by the
C implementation.
2013-01-24 07:23:34 -08:00
Eli Bendersky 1bf239446f fix trailing whitespace 2012-06-01 07:15:00 +03:00
Eli Bendersky 52467b167e Issue #14007: make XMLParser a real subclassable type exported from _elementtree. +cleanups 2012-06-01 07:13:08 +03:00
Eli Bendersky 48d358ba86 Issue #14007: implemented the 'element_factory' feature of TreeBuilder in
_elementtree, with a test.
2012-05-30 17:57:50 +03:00
Eli Bendersky 737b173355 Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.
Add attrib keyword to Element and SubElement in _elementtree.
Patch developed with Ezio Melotti.
2012-05-29 06:02:56 +03:00
Eli Bendersky c1d9869cb9 Issue #14006: improve the documentation of xml.etree.ElementTree
Removed the useless explanation of the Element data structure that started the
documentation page. Instead, the documentation now starts with a brief tutorial
skimming some of the capabilities of the module. The tutorial can be followed
by additional topic-specific sections (such as XPath support), and eventually
by a reference that goes over the module's classes and functions, as usual.
2012-03-30 11:44:15 +03:00
Eli Bendersky ede001a832 Fix doc typo noticed by Amaury Forgeot d'Arc 2012-03-27 04:57:23 +02:00
Eli Bendersky 3a4875e5e3 Issue #6488: Explain the XPath support of xml.etree.ElementTree, with code
samples and a reference. Also fix the other nits mentioned in the issue.

This also partially addresses issue #14006.
2012-03-26 20:43:32 +02:00
Eli Bendersky 396e8fcf36 Issue #13782: streamline argument type-checking in ET.Element
append, extend and insert now consistently type-check their argument in both
the C and Python implementations, and raise TypeError for non-Element
argument.

Added tests
2012-03-23 14:24:20 +02:00
Eli Bendersky 3405001491 Issue #9257: clarify the events iterparse accepts 2012-03-16 08:42:36 +02:00
Eli Bendersky 604c4ff43d Issue #9257: clarify the events iterparse accepts 2012-03-16 08:41:30 +02:00
Eli Bendersky 5b77d81314 Issue #14207: the ParseError exception raised by _elementtree was made
consistent to the one raised by the Python module (the 'code' attribute
was added).

In addition, the exception is now documented.

Added a test to check that ParseError has the required attributes, and
threw away the equivalent doctest which is no longer required.
2012-03-16 08:20:05 +02:00
Florent Xicluna a72a98f24a Issue #13988: cElementTree is deprecated and the _elementtree accelerator is automatically used whenever available. 2012-02-13 11:03:30 +01:00
Ezio Melotti 138fc896c8 #13138: add missing versionadded. 2011-10-10 00:02:03 +03:00