[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to get character entities out of MSXML parser - Pa
Hi all (yes I am back with this question for another beating...thank you very much) given the following XML structure as XMLFile.xml <?xml version="1.0"?> <Company> <AccountNumber Name="Ben & Jerry's" PhoneNumber="555-1212">123456</AccountNumber> </Company> and the following code from a visual basic project Function ShowXML() as string Dim msName As String Dim XMLList1 As New MSXML2.FreeThreadedDOMDocument30 XMLList1.async = False XMLList1.validateOnParse = False XMLList1.resolveExternals = False XMLList1.preserveWhiteSpace = True Dim pbParserLoadError as Boolean Dim selection1 As MSXML2.IXMLDOMSelection pbParserLoadError = XMLList1.LoadXML(XMLFile.xml) Set selection1 = XMLList1.selectNodes("//AccountNumber") 1: msName = selection1.Item(i).Attributes.getNamedItem("Name").Text 2: selection1.Item(i).Attributes.getNamedItem("Name").Text = "Ben & Jerry's" 3: msName = selection1.Item(i).Attributes.getNamedItem("Name").Text ShowXML = msName End Function then the value of msName at line 1 is displayed as Ben & Jerry's then the value of the attribute Name is then set to "Ben &: Jerry's" at line 2 just as the original value existed in the xml structure then the value of msName at line 3 is displayed as Ben & Jerry's with the ampersand as & Since is possible to extract out the value in an untransformed state (line 3) after it has been set in code (line 2), does anyone know how to extract out the untransformed value after the initial load ?? Meaning .....I need ShowXML to return "Ben & Jerry's" , not "Ben & Jerry's" Ok let the beating begin round 2 Thanks Jim Garrett XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|