The Artima Developer Community
Sponsored Link

Java Answers Forum
Reading \ character in XML

2 replies on 1 page. Most recent reply: Aug 5, 2003 10:29 AM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Benoit Pesty

Posts: 4
Nickname: tchule
Registered: Aug, 2003

Reading \ character in XML Posted: Aug 5, 2003 1:58 AM
Reply to this message Reply
Advertisement
Hello,

I've a problem to read an XML file containing the \ character. I want to read this character 'as is' and not to interpret it as an escape character. How can i do this ?

The file looks like this :

<?xml version='1.0' encoding = 'ISO-8859-1'>
...
<Address>AV. DAS NA\OES</Address>
...


Thanks for your help.


Benoit Pesty

Posts: 4
Nickname: tchule
Registered: Aug, 2003

Re: Reading \ character in XML Posted: Aug 5, 2003 2:51 AM
Reply to this message Reply
Sorry, I've posted this message too fast, my problem wasn't the \ character.

Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: Reading \ character in XML Posted: Aug 5, 2003 10:29 AM
Reply to this message Reply
Every character has a character code.
'ISO-8859-1' is a character encoding type.

The java.nio.charset.Charset class documentation can give you some insight:
http://java.sun.com/j2se/1.4.1/docs/api/java/nio/charset/Charset.html

Flat View: This topic has 2 replies on 1 page
Topic: im getting a null pointer exception Previous Topic   Next Topic Topic: Regarding Applets

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use