|
|||||||||||||
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 here. If you've already registered, please log in. If you haven't registered yet, please register and log in.
Note: the LabWindows/CVI Idea Exchange is not the appropriate forum to submit technical support questions.
The LabWindows/CVI R&D team is committed to reviewing every idea submitted via the LabWindows/CVI Idea Exchange. However, we cannot guarantee the implementation of any LabWindows/CVI Idea Exchange submission.
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page