--- a/src/reportlab/lib/rparsexml.py Thu Dec 11 12:08:24 2008 +0000
+++ b/src/reportlab/lib/rparsexml.py Thu Dec 11 17:15:26 2008 +0000
@@ -1,23 +1,23 @@
"""Radically simple xml parsing
-Example parse
+Example parse::
-<this type="xml">text <b>in</b> xml</this>
+ <this type="xml">text <b>in</b> xml</this>
-( "this",
- {"type": "xml"},
- [ "text ",
- ("b", None, ["in"], None),
- " xml"
- ]
- None )
+ ( "this",
+ {"type": "xml"},
+ [ "text ",
+ ("b", None, ["in"], None),
+ " xml"
+ ]
+ None )
-{ 0: "this"
- "type": "xml"
- 1: ["text ",
- {0: "b", 1:["in"]},
- " xml"]
-}
+ { 0: "this"
+ "type": "xml"
+ 1: ["text ",
+ {0: "b", 1:["in"]},
+ " xml"]
+ }
Ie, xml tag translates to a tuple:
(name, dictofattributes, contentlist, miscellaneousinfo)
@@ -26,15 +26,15 @@
(with the intention of adding, eg, line number information)
special cases: name of "" means "top level, no containing tag".
-Top level parse always looks like this
+Top level parse always looks like this::
- ("", list, None, None)
+ ("", list, None, None)
contained text of None means <simple_tag\>
-In order to support stuff like
+In order to support stuff like::
- <this></this><one></one>
+ <this></this><one></one>
AT THE MOMENT & ETCETERA ARE IGNORED. THEY MUST BE PROCESSED
IN A POST-PROCESSING STEP.