Functions
|
|
|
|
childNodesWithoutEmptySpaces
|
childNodesWithoutEmptySpaces ( node )
|
|
elementUnder
|
elementUnder (
parent,
name,
attributes=(),
)
creates element inside of parent and returns it,
attributes are as sequence of (name,value) sequences
|
|
getAllTextFromElement
|
getAllTextFromElement ( element )
like getTextFromElement but mines text also from child nodes
|
|
getAttributes
|
getAttributes ( element, names )
returns a list of attribute values from a list of attr names
|
|
getFirstChildNamed
|
getFirstChildNamed ( element, name )
|
|
getParentNameList
|
getParentNameList ( element )
returns a list of parent names (from father to grandfather...)
|
|
getTextFromElement
|
getTextFromElement ( element )
|
|
isNotEmptyText
|
isNotEmptyText ( element )
|
|
isOnlyTags
|
isOnlyTags ( text )
this function takes a !string! as an argument and returns true if text is only tags
|
|
safe_indent
|
safe_indent (
element,
level=0,
step=2,
)
indents DOM tree. Does not add any extra whitespaces to text elements.
|
|
setAttributes
|
setAttributes ( element, attributes )
|
|
simpleXPathSearch
|
simpleXPathSearch ( element, path )
|
|
textOnlyElementUnder
|
textOnlyElementUnder (
parent,
name,
text,
attributes=(),
)
|