Home | Trees | Indices | Help |
|
---|
|
Helper functions for working with XML.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
xml_preserve_ancestors = etree.XPath("ancestor-or-self::*[attr All ancestors with xml:space='preserve' |
|||
xml_space_ancestors = etree.XPath("ancestor-or-self::*/attribu All xml:space attributes in the ancestors |
|||
string_xpath = etree.XPath("string()") Return a non-normalized string in the node subtree |
|||
string_xpath_normalized = etree.XPath("normalize-space()") Return a (space) normalized string in the node subtree |
|||
XML_NS =
|
|||
MULTIWHITESPACE_PATTERN =
|
|||
MULTIWHITESPACE_RE = re.compile(r'
|
Imports: re, etree
|
Extracts the plain text content out of the given node. This method checks the xml:space attribute of the given node, and takes an optional default to use in case nothing is specified in this node. |
Returns name in Clark notation within the given namespace. For example namespaced("source") in an XLIFF document might return: {urn:oasis:names:tc:xliff:document:1.1}source This is needed throughout lxml. |
|
xml_preserve_ancestorsAll ancestors with xml:space='preserve'
|
xml_space_ancestorsAll xml:space attributes in the ancestors
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Mar 3 16:35:55 2010 | http://epydoc.sourceforge.net |