xml.dom.Document.createAttribute()

Document.createAttribute(name) Create and return an attribute node. This method does not associate the attribute node with any particular element. You must use setAttributeNode() on the appropriate Element object to use the newly created attribute instance.

xml.dom.Document.createComment()

Document.createComment(data) Create and return a comment node containing the data passed as a parameter. As with the other creation methods, this one does not insert the node into the tree.

xml.dom.Attr.value

Attr.value The text value of the attribute. This is a synonym for the nodeValue attribute.

xml.dom.Attr.localName

Attr.localName The part of the name following the colon if there is one, else the entire name. This is a read-only attribute.

xml.dom.Attr.name

Attr.name The attribute name. In a namespace-using document it may include a colon.

XML Processing Modules

Source code: Lib/xml/ Python’s interfaces for processing XML are grouped in the xml package. Warning The XML modules are not secure against erroneous or maliciously constructed data. If you need to parse untrusted or unauthenticated data see the XML vulnerabilities and The defusedxml and defusedexpat Packages sections. It is important to note that modules in the xml package require that there be at least one SAX-compliant XML parser available. The Expat parser is included with Python, so the

xdrlib.Unpacker.unpack_string()

Unpacker.unpack_string() Unpacks and returns a variable length string. The length of the string is first unpacked as an unsigned integer, then the string data is unpacked with unpack_fstring().

xdrlib.Unpacker.unpack_fopaque()

Unpacker.unpack_fopaque(n) Unpacks and returns a fixed length opaque data stream, similarly to unpack_fstring().

xdrlib.Unpacker.unpack_opaque()

Unpacker.unpack_opaque() Unpacks and returns a variable length opaque data string, similarly to unpack_string().

xdrlib.Unpacker.unpack_float()

Unpacker.unpack_float() Unpacks a single-precision floating point number.