xml.dom.Comment.data

Comment.data The content of the comment as a string. The attribute contains all characters between the leading <!-- and trailing -->, but does not include them.

xml.dom.Attr.value

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

xml.dom.Attr.prefix

Attr.prefix The part of the name preceding the colon if there is one, else the empty string.

xml.dom.Attr.name

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

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 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_opaque()

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

xdrlib.Unpacker.unpack_list()

Unpacker.unpack_list(unpack_item) Unpacks and returns a list of homogeneous items. The list is unpacked one element at a time by first unpacking an unsigned integer flag. If the flag is 1, then the item is unpacked and appended to the list. A flag of 0 indicates the end of the list. unpack_item is the function that is called to unpack the items.

xdrlib.Unpacker.unpack_fstring()

Unpacker.unpack_fstring(n) Unpacks and returns a fixed length string. n is the number of characters expected. Padding with null bytes to guaranteed 4 byte alignment is assumed.