[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

Subject: How to get character entities out of MSXML parser - Part 2
From: jdgarrett@xxxxxxxxxx
Date: Tue, 2 Oct 2001 12:24:21 -0500
msxml parser ampersand
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 &amp; 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 &amp;
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 &amp: 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 &amp; Jerry's
with the ampersand as   &amp;


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 &amp; 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.