special character in xml document (from excel)

Q

quickcur

I am rewrite some of my excel sheets to xml document. In my excel,
there is a lot of special characters like "/", " " (space), "#", "+'.
I am using a java program based on JDom to to create xml. The program
is complaining about those characters with the exception like

org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal
XML character is specified.
at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown
Source)
at Excel2Xml.main(Excel2Xml.java:41)

What is the best way to handle this? I do want to keep those special
characters in my document.

Thanks,

qq
 
P

Peter Flynn

I am rewrite some of my excel sheets to xml document. In my excel,
there is a lot of special characters like "/", " " (space), "#", "+'.

None of those is special in XML. Only < and & have a special meaning to
start with.
I am using a java program based on JDom to to create xml. The program
is complaining about those characters with the exception like

org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal
XML character is specified.
at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown
Source)
at Excel2Xml.main(Excel2Xml.java:41)

What is the best way to handle this? I do want to keep those special
characters in my document.

Without seeing exactly what character it is complaining about, it's
not possible to answer this question.

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top