473,320 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

encoding specified in XML declaration is incorrect:

1
i have problem to parse the xml in unicode encoding

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="unicode"?>
  2. <page pageNumber="2" pageTemplate="FlexiLayout1">
  3.    <block blockName="Address">13174 Eticanto Drive</block>
  4.    <block blockName="City">L.A. - Sherman Oaks Area</block>
  5.    <block blockName="state"></block>
  6.    <block blockName="lcode">ZlD_Cod9 91403</block>
  7. </page>
how i parse this xml
Nov 8 '05 #1
2 13109
Hi chetan,

Try in this way.

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8"?>
or
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-16"?>
<?xml version="1.0" encoding="unicode"?> is wrong way of specifying the encoding to be followed.


So use any one of the following
windows-1252
iso-8859
utf-8
utf-16

Thanks
Bharath
Mar 4 '09 #2
Dormilich
8,658 Expert Mod 8TB
@TechiBharath
it's iso-8859-X where X is the number of the iso charset (e.g. 1 for Latin-1, and so on)
Mar 5 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Gustaf Liljegren | last post by:
I'm using xml.sax.parseString to read an XML file. The XML file contains a few words in Russian, and is encoded in UTF-8 using C#. In the example below, MyParser() is my SAX ContentHandler class....
2
by: YGUEL | last post by:
Hello, do you know a good program to test what sort of charachters encoding is used in a file. I use iconv but it only can translate from a charachter encoding to an other. The problem is that I...
48
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at...
4
by: Stephen | last post by:
Using the code below I am trying, in VB .Net 2003, to serialise classes defined in a couple of XSD documents. The encoding for both is Unicode(UTF-8). However the resulting XML is encoded as...
8
by: Demon News | last post by:
I'm trying to do a transform (Using XmlTransform class in c#) and in the Transform I'm specifying the the output xsl below: <xsl:output method="xml" encoding="UTF-8" indent="no"/> the...
3
by: sjoshi | last post by:
I'm doig a test using XP English with LocalSettings set to Russian. When trying to open an XML file with ANSI encoding, I get errors. When I change the encoding to UTF8, I can read the file...
2
by: =?iso-8859-1?q?S=E9bastien_Boisg=E9rault?= | last post by:
Hi, ET being ElementTree in the following code, could anyone explain why it fails ? "<?xml version='1.0' encoding='UTF-16'?>\n<\xff\xfer\x00o\x00o\x00t\x00 />" Traceback (most recent call...
3
by: mortb | last post by:
1. How do I determine which encoding a xmldocument or xmlreader uses when opening a document? I'm not just talking about the <?xml encoding="utf-8"?attribute, but the actual encoding of the...
1
by: Oleg Subachev | last post by:
I need to read XML file, transform it and then save in the same encoding. XmlDocument class naturally has no encoding-related members. How can I determine encoding of XML file ? Oleg Subachev
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.