xmlinit |
Initialize XML parser |
xmlctx *xmlinit (uword *err, const oratext *encoding, void (*msghdlr)(void *msgctx, const oratext *msg, ub4 errcode), void *msgctx, const xmlsaxcb *saxcb, void *saxcbctx, const xmlmemcb *memcb, void *memcbctx, const oratext *lang); |
xmlclean |
Clean up memory used during parse |
void xmlclean(xmlctx *ctx);
For those who want to parse multiple files but would like to free the memory used for parses before the subsequent call to xmlparse() or xmlparsebuf(). |
xmlparse |
Parse a file |
uword xmlparse(xmlctx *ctx, const oratext *filename, const oratext *encoding, ub4 flags);
Flag bits must be OR'd to override the default behavior of the parser. The following flag bits may be set:
- XML_FLAG_VALIDATE turns validation on.
- XML_FLAG_DISCARD_WHITESPACE discards whitespace where it appears to be insignificant.
The default behavior is to not validate the input. The default behavior for whitespace processing is to be fully conformant to the XML 1.0 spec, i.e. all whitespace is reported back to the application but it is indicated which whitespace is ignorable. |
xmlparsebuf |
Parse a buffer |
uword xmlparsebuf(xmlctx *ctx, const oratext *buffer, size_t len, const oratext *encoding, ub4 flags); |
xmlterm |
Shut down XML parser |
uword xmlterm(xmlctx *ctx); |
createDocument |
Create a new document |
xmlnode* createDocument(xmlctx *ctx)
An XML document is always rooted in a node of type DOCUMENT_NODE-- this function creates that root node and sets it in the context. |
isStandalone |
Return document's standalone flag |
boolean isStandalone(xmlctx *ctx)
Returns the boolean value of the document's standalone flag, as specified in the <?xml?> processing instruction. |