Home | History | Annotate | Download | only in etree

Lines Matching defs:XML

1 """Lightweight XML support for Python.
3 XML is an inherently hierarchical data format, and the most natural way to
6 1. ElementTree represents the whole XML document as a tree and
11 usually done on the ElementTree level. Interactions with a single XML element
32 and convert it to and from XML.
87 "XML", "XMLID",
105 """An error when parsing an XML document.
124 """An XML element.
465 serializes as an XML comment.
479 serializes as an XML comment.
543 """An XML element hierarchy.
546 standard XML.
549 *file* is an optional file handle or file name of an XML file whose
574 """Load external XML document into element tree.
726 """Write element tree to a file as XML.
733 *xml_declaration* -- bool indicating if an XML declaration should be
734 added to the output. If None, an XML declaration
738 *default_namespace* -- sets the default XML namespace (for "xmlns")
740 *method* -- either "xml" (default), "html, "text", or "c14n"
750 method = "xml"
760 if method == "xml" and (xml_declaration or
765 # Retrieve the default encoding for the xml declaration
768 write("<?xml version='1.0' encoding='%s'?>\n" % (
858 if prefix != "xml":
866 # FIXME: can this be handled in XML 1.0?
1013 "xml": _serialize_xml,
1042 "http://www.w3.org/XML/1998/namespace": "xml",
1046 # xml schema
1088 # Section 2.11 of the XML specification, stating that
1090 # http://www.w3.org/TR/REC-xml/#sec-line-ends
1121 """Generate string representation of XML element.
1128 be one of "xml" (default), "html", "text" or "c14n".
1130 Returns an (optionally) encoded string containing the XML data.
1171 ordinary XML file.
1187 """Parse XML document into element tree.
1189 *source* is a filename or file object containing XML data,
1201 """Incrementally parse XML document into ElementTree.
1209 *source* is a filename or file object containing XML data, *events* is
1301 def XML(text, parser=None):
1302 """Parse XML document from string constant.
1304 This function can be used to embed "XML Literals" in Python code.
1306 *text* is a string containing XML data, *parser* is an
1319 """Parse XML document from string constant for its IDs.
1321 *text* is a string containing XML data, *parser* is an
1339 # Parse XML document from string constant. Alias for XML().
1340 fromstring = XML
1343 """Parse XML document from sequence of string fragments.
1366 You can use this class to build an element structure using a custom XML
1367 parser, or a parser for some other XML-like format.
1436 """Element structure builder for XML source data based on the expat parser.
1441 which if given, overrides the encoding specified in the XML file:
1448 from xml.parsers import expat
1564 from xml.parsers import expat