XML processor that lets elements and attributes "negotiate" w/each other
Basic usage:
neg = Negotiator()
neg.setLookup(elem_lookup_func, attr_lookup_func)
neg.parseStream(file,root) # or neg.parseString(text,root)
Methods
|
|
|
|
__init__
|
__init__ ( self )
|
|
_afterParsing
|
_afterParsing ( self )
|
|
_beforeParsing
|
_beforeParsing (
self,
root=None,
url=None,
)
|
|
addNamespace
|
addNamespace (
self,
prefix,
ns_uri,
)
|
|
comment
|
comment ( self, text )
|
|
endElement
|
endElement ( self, name=None )
|
|
err
|
err (
self,
msg,
kind=SyntaxError,
)
Generate an error with current parse location
|
|
literal
|
literal ( self, text )
|
|
makeParser
|
makeParser ( self )
|
|
parseStream
|
parseStream (
self,
stream,
root=None,
url=None,
)
|
|
parseString
|
parseString (
self,
text,
root=None,
url=None,
)
|
|
resetCaches
|
resetCaches ( self )
|
|
setLookups
|
setLookups (
self,
element=None,
attribute=None,
)
|
|
splitName
|
splitName ( self, name )
|
|
startElement
|
startElement (
self,
name,
attrs,
)
|
|
text
|
text ( self, text )
|
|