Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

XML newbie

Options
  • 29-04-2002 5:44pm
    #1
    Registered Users Posts: 347 ✭✭


    Right, I have to learn XML rather quickly.. I know the basics, I won't be working with CSS/XSL, I'll just be parsing and generating the stuff. Any good tutorials out there, recommendations for parsers (using java) and also, this piece of work requires me to store HTML and other random text characters that could possibly resemble html tags within the XML. Do the parsers look after this, ie, sticking to the DTD, or is there some special way of doing this? All help/suggestions/URLs appreciated.


Comments

  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Yeah Java's pretty good for this kind of thing. In fact it's built into Java 1.4 (the latest version). Check out http://developer.java.sun.com and go to the tutorials section, you're bound to find something useful there.
    As for having HTML or other random text characters in your XML, you can put them into CDATA blocks, which means they won't be processed as XML. You'll see anyways, it's very simple once you get the hang of it.

    Good luck!


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Even if it's CDATA you would still have to escape out a few characters.

    Off the top of my head the following characters shouldn't be in a data block.

    " - Use "
    & - Use &
    < - Use &lt;

    Probably good idea to escape out > and / ? Or did I miss any?


  • Registered Users Posts: 347 ✭✭Static


    Thanks lads.


Advertisement