I have a XML that I read with an object of type Msxml2.DOMDocument.4.0
. In this XML I receive characters like ë
. When I read this character it comes in VBScript code like this �
. The XML encoding is set to UTF-8.
This is one part of the XML that I receive:
<?xml version="1.0" encoding="utf-8"?>
<shiporder>
<DriverData>
<DriverLicenseCountry>Australië</DriverLicenseCountry>
</DriverData>
</shiporder>
And this is the vbScript code that I use for creating the object:
Set oXml = Server.CreateObject("Msxml2.DOMDocument.4.0")
I read the node like this :
Function GetXMLval2(oDoc, sNoeud)
Dim oNoeud
Dim objNode
Dim colNodes
Dim sRes
sRes=""
Set colNodes=oDoc.selectNodes(sNoeud)
For Each objNode in colNodes
sRes= objNode.Text
Next
GetXMLval2=sRes
End Function
Where oDOC
is the XML and sNoeud
is the node name. The objNode.Txt
is returning that weird character.
Any ideas ?