Subject: [xsl] Character encoding in MSXML 3.0 from VB From: Philip Fitzsimons <PFitzsimons@xxxxxxx> Date: Mon, 8 Jan 2001 16:26:45 -0000 |
Hi, I have a rather strange problem with MSXML, given the following xml <?xml version="1.0"?> <mydoc> he said ‘yes’ </mydoc> I should be able to extract the text, (with the quotes being open and close): he said 'yes' however, MSXML insists on returning he said ?yes? now this would look like a character encoding issue, apart from the fact that I don't think MSXML should be doing this, given that I have read my input file as a binary string and used loadXML i.e. lng_InputFile = FreeFile Open str_FileName For Binary Access Read As lng_InputFile str_XMLin = Input(FileLen(str_FileName), #lng_InputFile) Close #lng_InputFile domdoc_MyDoc.loadXML(str_XMLin) i expect (silly me) that ?domdoc_MyDoc.childnodes(1).childnodes(0).xml should output: he said ‘yes’ and ?domdoc_MyDoc.childnodes(1).childnodes(0).text should output: he said 'yes' The documenation tends to suggest that &#n; are handled at load time, well whilst this is a bit odd I don't see why does it messes up the conversion? no matter what processing instruction I stick in the file it always replaces the character references with question marks rather than the quotes. If I am really nasty and replace the ‘ in the file with the actuall charater, it works fine! So, how do I get MSXML to load the entity ‘ and either a) leave it as ‘ or b) replace it with the correct open quote. thoughts appreciated. Philip. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Print a catalouge, James Robinson - Pol | Thread | Re: [xsl] Character encoding in MSX, David Carlisle |
[xsl] Print a catalouge, Ulf Carlsson | Date | Re: [xsl] XML to RTF with XSL?, Dan Vint |
Month |