special character in xml document (from excel)

Discussion in 'XML' started by quickcur@yahoo.com, Jan 8, 2005.

  1. Guest

    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
    , Jan 8, 2005
    #1
    1. Advertising

  2. Peter Flynn Guest

    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.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
    --
    "The cat in the box is both a wave and a particle"
    -- Terry Pratchett, introducing quantum physics in _The Authentic Cat_
    Peter Flynn, Jan 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UHVzaHBlbmRyYQ==?=

    Error reading special character '{' hexadecimal value 0x7B in xml

    =?Utf-8?B?UHVzaHBlbmRyYQ==?=, Jul 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,587
    Shan Plourde
    Jul 27, 2004
  2. KFC
    Replies:
    1
    Views:
    638
  3. Replies:
    1
    Views:
    902
    Roedy Green
    Oct 27, 2005
  4. Tony Prichard
    Replies:
    0
    Views:
    722
    Tony Prichard
    Dec 12, 2003
  5. Thierry Lam
    Replies:
    2
    Views:
    374
    Chris
    Sep 6, 2005
Loading...

Share This Page