Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

XML newbie

  • 29-04-2002 04:44PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 347 ✭✭Static


    Thanks lads.


Advertisement