Currently, it is only possible to load XML for parsing from an xml file. In order to load xml data from a string, it is necessary to either write to a temporary file, or use the MSXML library directly. It would be fairly simple to modify the CVIXMLLoadDocument() Function (or create a new function) which uses the MSXML IXMLDOMDocumentloadXML() function, which allows loading XML directly from a string.
Adding this code to the current function after the IXMLDOMDocumentload() function would improve the CVIXMLLoadDocument() function so that it tries opening the input string as direct XML if it is not a path (Replaces line 167):
__caErrChk(MSXML_IXMLDOMDocumentload(xmlHdl, NULL, variantPath, &success)); if(!success) //if loading as a path fails, try reading as direct XML code { __caErrChk(MSXML_IXMLDOMDocumentloadXML(xmlHdl, NULL, fullPath, &success)); }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.