Re: XML parsing problem

Discussion in 'Java' started by Thomas Weidenfeller, Sep 1, 2003.

  1. Kevin Pors <> writes:
    > <comments>http://www.battle.net/forums/thread.aspx?ForumName=d2-europe-trading&ThreadID=62916</comments>


    <comments>http://www.battle.net/forums/thread.aspx?ForumName=d2-europe-trading&amp;ThreadID=62916</comments>

    You want to read a little bit about the basics of XML, especially this
    part of the standard:

    http://www.w3.org/TR/REC-xml#syntax

    /Thomas
    Thomas Weidenfeller, Sep 1, 2003
    #1
    1. Advertising

  2. Thomas Weidenfeller

    Kevin Pors Guest

    On Mon, 1 Sep 2003 11:43:26 +0000 (UTC), lid (Thomas Weidenfeller) wrote:

    > <comments>http://www.battle.net/forums/thread.aspx?ForumName=d2-europe-trading&amp;ThreadID=62916</comments>


    Okay, I've tried that, but when parsing this I get this in return in the JTable:

    ThreadID=62916

    instead of the whole thing (including the &amp;).
    I guess I have to look for ampersands in the XML file so I can convert them right?
    Kevin Pors, Sep 1, 2003
    #2
    1. Advertising

  3. Kevin Pors wrote:
    > On Mon, 1 Sep 2003 11:43:26 +0000 (UTC), lid (Thomas Weidenfeller) wrote:
    >
    >
    >><comments>http://www.battle.net/forums/thread.aspx?ForumName=d2-europe-trading&amp;ThreadID=62916</comments>

    >
    >
    > Okay, I've tried that, but when parsing this I get this in return in the JTable:
    >
    > ThreadID=62916
    >
    > instead of the whole thing (including the &amp;).
    > I guess I have to look for ampersands in the XML file so I can convert them right?
    >


    Did you use a CDATA section?

    /S
    Sigmund Lundgren, Sep 2, 2003
    #3
  4. Thomas Weidenfeller

    Kevin Pors Guest

    On Tue, 02 Sep 2003 22:15:38 GMT, Sigmund Lundgren <> wrote:

    >Did you use a CDATA section?
    >
    >/S


    No. But I started using conversion. Like a '&' would be changed to a String :AMP: in the
    XML file. When I parse it, i change the :AMP: back to an ampersand. Got the same when a user
    enters a '>' or a '<' sign. '<' would change to :GT: and '>' to :LT:
    I don't think i need more for this to work well i guess ;)

    Easier methods would be preferred though :p
    Kevin Pors, Sep 3, 2003
    #4
    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. Per Magnus L?vold
    Replies:
    0
    Views:
    1,379
    Per Magnus L?vold
    Nov 15, 2004
  2. Greg Wogan-Browne
    Replies:
    1
    Views:
    806
    Uche Ogbuji
    Jan 28, 2005
  3. Replies:
    2
    Views:
    501
  4. John Levine
    Replies:
    0
    Views:
    730
    John Levine
    Feb 2, 2012
  5. Erik Wasser
    Replies:
    5
    Views:
    452
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page