This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to get character entities out of MSXML parser - Part 2
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] How to get character entities out of MSXML parser - Part 2
- From: jdgarrett at alltel dot net
- Date: Tue, 2 Oct 2001 12:24:21 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
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