Parse an XML entity that is hold inside the memory pointed by entity and limited by entity_size. The function parses the XML document inside the memory hold inside the given reference. The function returns an XML document, represented by axlDoc. The function, optionall, could report error found inside the given axlError variable. In the case the function returns a NULL value, this variable is filled containing the a textual diagnostic error to be showed to the user interface and an error code. Here is an example: // axl document representation axlDoc * doc; axlError * error; // parse the given string doc = axl_doc_parse ("<?xml version='1.0' ?><axldoc />", 32, &error); if (doc == NULL) { printf ("Error found: %s\n", axl_error_get (error)); axl_error_free (error); return false; } // release document parsed axl_doc_free (doc);
|