472,353 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Error while parsing local languages using SAX/DOM parser.

Hi,
I am facing a problem while parsing local language characters using
sax parser. We use DOM to parse and SAX to read the source. But when
our application parses strings with local language especially
czech,polish,turkish in place of local language character some other
word is comming.

Eg:
Input string :ahoj, jak se máš
Output string :ahoj, jak se máš
OS: Solaris.

We persist this xml in the database. This issue was not comming when
the parser was that of IBM and os NT.The local language character is
getting replaced by "&aacute". This causing problem when we tranlsate
it back.Can anyone please help me.

Stack Trace

class org.xml.sax.SAXException message = Parser reported fatal error
while parsing : Input Source/DTD
Stack Trace:
org.xml.sax.SAXParseException: The entity "aacute" was referenced, but
not declared.
at org.apache.xerces.util.ErrorHandlerWrapper.fatalEr ror(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError (Unknown
Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeVal ue(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanAttribute(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanStartElement(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl
$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl
$FragmentContentDispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

Thanks,
Sidhartha
Sep 15 '08 #1
1 3393
Sidhartha wrote:
Hi,
I am facing a problem while parsing local language characters using
sax parser. We use DOM to parse and SAX to read the source. But when
our application parses strings with local language especially
czech,polish,turkish in place of local language character some other
word is comming.

Eg:
Input string :ahoj, jak se máš
Output string :ahoj, jak se máš
OS: Solaris.

We persist this xml in the database. This issue was not comming when
the parser was that of IBM and os NT.The local language character is
getting replaced by "&aacute". This causing problem when we tranlsate
it back.Can anyone please help me.
It is rather odd that you get an XHTML entity reference 'á' in
your XML. I am not sure why that happens. Are you using XSLT for
instance to serialize XML?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 15 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a....
14
by: Viktor Rosenfeld | last post by:
Hi, I need to create a parser for a Python project, and I'd like to use process kinda like lex/yacc. I've looked at various parsing packages...
2
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making...
0
by: Yarco | last post by:
I have just installed phpdocumentor on using: pear.bat install phpdocumentor-beta to suitable my php version. Then i create a test file...
6
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making...
2
by: Brett | last post by:
I uploaded an ASP.NET website from my developer machine to a remote server. The paths differ slightly as follows: Local Path:...
14
by: brett | last post by:
I have an ASP.NET 2.0 web application that runs fine on my local machine. However, once I upload it, I get this error: Parser Error...
4
by: Chronictank | last post by:
Hi, as a bit of background (and seeing as it is my first post :)) i am a complete newbie at perl. I literally picked it up a week ago to do this...
3
by: =?Utf-8?B?SGVyYg==?= | last post by:
I've developed an ASP.NET website that runs fine on my local WinXP IIS and on my server's IIS, both are IIS6.0 The site uses a master page that...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.