String vs. XML file
-
I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT. Is there a way to convert a String with XSLT, or do we need to rewrite the XML file? TIA, Scott
-
I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT. Is there a way to convert a String with XSLT, or do we need to rewrite the XML file? TIA, Scott
You can load the tring into an XMLDocument object much like you load it from file.
HRESULT loadXML(BSTR bstrXML,VARIANT_BOOL * isSuccessful);
This migth be an Microsoft extension of the DOM model, but it exists in MSXML. Then it is possible to transform it using the transformNode method of the XMLDocument object.HRESULT transformNode(IXMLDOMNode *stylesheet, BSTR *xmlString);
/Per -
I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT. Is there a way to convert a String with XSLT, or do we need to rewrite the XML file? TIA, Scott
What language/technology are you using? Michael Flanakin Web Log