Skip to content

mdz_xml_parseFile

maxdz-gmbh edited this page Apr 29, 2021 · 4 revisions

Reads from file and makes writable parsing of XML-document.

mdz_bool mdz_xml_parseFile(
  const struct mdz_Xml* pXml,
  const char* pcFileName,
  mdz_bool bParseWritable,
  mdz_bool bTrimSpaces);

Parameter Description
pXml pointer to XML-parser instance returned by mdz_xml_create()
pcFileName XML-document filename, including path. File-content will be treated as a single-bytes string
bParseWritable if writable parsion of XML-document is allowed. File content will not be changed, only loaded from file XML-document
bTrimSpaces if leading/trail spaces in element text should be trimmed/deleted (makes DOM-structure in-memory size smaller)
Return Description
mdz_false if pXml == NULL
mdz_false if license is invalid/expired (MDZ_XML_ERROR_LICENSE)
mdz_false if pcFileName is NULL or empty (MDZ_XML_ERROR_PARAM)
mdz_false if file reading problems (MDZ_XML_ERROR_FILE)
mdz_false if there are memory-allocation problems (MDZ_XML_ERROR_MEMORY)
mdz_false if there are parsing problems (MDZ_XML_ERROR_PARSE). In shis case mdz_Xml.m_nErrorPos contains position of unexpected/erroneous character in XML-document
mdz_true parsing succeeded
mdz_xml API Reference is generated using mdzApiRefGenerator.
mdz_xml API Reference is generated using mdzApiRefGenerator.
Clone this wiki locally