Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > special character in xml document (from excel)

Reply
Thread Tools

special character in xml document (from excel)

 
 
quickcur@yahoo.com
Guest
Posts: n/a
 
      01-08-2005
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.createEleme nt(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

 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      01-08-2005
wrote:

> 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.createEleme nt(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
--
"The cat in the box is both a wave and a particle"
-- Terry Pratchett, introducing quantum physics in _The Authentic Cat_
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending HTML Form, Reading Returned XML data, Special Character Problem quentinmacdougall@gmail.com Java 1 10-27-2005 07:03 PM
Help, Generate XML with special chinese character (JDOM) failure KFC Java 1 12-12-2004 03:09 PM
Error reading special character '{' hexadecimal value 0x7B in xml =?Utf-8?B?UHVzaHBlbmRyYQ==?= ASP .Net 2 07-27-2004 07:41 PM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments