To use this api, it's easy : create the reader, read the content and destroy !
The Scol type to use with this api. .........
Create an object from a file (within the active partition). This creation is made in the specific thread. All threatment should be done after a nul return by the callback.
Prototype :
Return : a new Scol object
Create an object from an url. This creation is made in the specific thread. All threatment should be done after a nul return by the callback.
Prototype :
Return : a new Scol object
Create an object from a string in memory. This creation is made in the specific thread. All threatment should be done after a nul return by the callback.
Prototype :
Return : a new Scol object
These few flags are available. READXML2_OPTION_NONE should be the most useful.
No flag asked
Recover on errors
Forbid network access
Remove any blank nodes
Remove the redundant namespaces declarations
Destroy an object. You should destroy it when you no longer needed.
Prototype :
Return 0 if success, nil if the object is already destroyed.
Reads the content of any valid object. ....
Prototype :
Return a list of tuples [[I S] r1]. The first member is one of these flags, the second is the result.
All return are a string (S). If a value doesn't exist / available, return nil.
return the xml used version, if available
return the xml encoding, if available. Example : "UTF-8"
Return whether is a standalone or not. Example : "1"
Return the xml language, if available
Return any text of an element. Example : xml file => <TEST> it is a test</TEST>
will return "it is a test"
Return the name of an element. Example : xml file => <TEST> it is a test</TEST>
will return "TEST"
Not really implemented. Tests the validity (via a DTD or others).
Return the attributes of the elements.
Return the values of each attribute.
Return the depth of the current node.
"line;column"
"NONE", "ELEMENT_START", "ELEMENT_END", "ATTRIBUTE", "TEXT", "CDATA", "COMMENT", "DOCUMENT", "DOCUMENT_TYPE", "DOCUMENT_FRAGMENT", "XML_DECLARATION", "ENTITY_START", "ENTITY_END" or nil
Don't use this flag
...
By default the xmlReader will report entities as such and not replace them with their content. To replace them, set this function to 1.
Prototype :
Return 0 if success, else nil
By default the xmlReader will report entities as such and not replace them with their content. This function returns the current behavior.
Prototype :
Return 1 if replace them, 0 if not replace them (default), nil if error