Looking to get into XML

Posted on 2007-08-03
Last Modified: 2013-11-26
I am looking to get my feet wet with XML data (typically in the form of files) using 2005 and I would like to learn a few things.
1. How to navigate through the data in teh XML file.
2. How to use XLT to transform the data
3. Basic concepts of XML and the power of the data format.

Any links or books you can offer would be appreciated...
Question by:NTGuru705
    LVL 25

    Expert Comment

    For books, Wrox's Professional XML and Professional XSL are good resources.  For VB.NET specific samples try Beginning VB.NET XML.

    For online samples check out MSDN:
    LVL 13

    Accepted Solution

    * Learn how to make XML well formed and know the difference between well formed and valid XML.
    * You can start out with learning XHTML, which is HTML according to the rules of XML. This will teach you the basic concepts. The only catch here is that browsers are lenient and don't punish you too bad if you make mistakes.
    * The first step here is to make all tags and attributes lowercase, nest all your tags properly, and close them all. That includes <img />, <br />, <meta />, <input />.
    * XPATH: this is the language to "navigate" through the XML. It basically works like UNIX-style folder navigation. An XML file has to have a root node (/), and from there on it is basically like a tree-structure.
    * XSLT: XSL Transformations; meant to transform XML into something else, which can be XML, XHTML, XSL-FO, but also text, SQL, whatever you like.
    * To transform XML into something else, you need an engine that supports this. Modern browsers can do this clientside. You can do it serverside using e.g. Saxon or Xalan. You can run these engines in a terminal/cmd shell if you want to. And several XML editors like oXygen can do these transformations inside the editor.
    * XSLT comes in two versions. Version 2.0 has a lot more functionality. But not many processors support it. None of the browsers support it yet. It's okay to start with 1.0, and most people use that.
    * XSL-FO: XSL Formatting Objects; language to format XML for display, like in PDF. To create PDF you need a special processor like FOP.
    * XSL: originally the creators of XSL thought one language could do all these things: transform, navigate, layout. It turned out that it was easier to split them into XSLT, XPATH and XSL-FO. XSL and XSLT are mixed in everyday language, but there is a difference! Just so you know.
    * XLINK, XQUERY, XFORMS: these are new languages for adding extra functionality. I haven't used them yet. They are quite new, and not much supported.
    * SVG: this is an XML language for vector images (like Flash/Illustrator). You can do a lot with it, but the downside is that IE doesn't support this. You need a plugin (free from Adobe). Firefox supports it natively.

    There is a lot more to it. The best thing you can do is buy some books. If you want to learn how to use XSLT, I can recommend XSLT 2.0 from Jenni Tennison (Apress), or XSLT from Tidwell (O'Reilly). These books give you a general introduction to XML as well, good enough to get started.
    LVL 51

    Expert Comment

    One piece of advice.  Don't percieve XML as a  "Silver Bullet".  XML is great at making hetrogenous data homogenous.  However, it is a poor choice for large datasets unless it is a stream transfer data between systems.  Most DOM (Document Object Model) manipulation or managment of database sets have to been executed in memory or streamed from disk which can be VERY expensive with large datasets.

    I work for a large company that decided to use XML as the primary method for managing data in a complex system.  Post deployment we ran into scaling and performance issues.  Serializing, searching and managing relational data in the XML was not working as well as expected.  The applicaiton was rewritten to use a RDMS and lo and behold, it worked properly!  All XML was removed.

    I'm an avid proponent of XML and use it extensively.  But I know it's strengths and weaknesses and use it when appropriate.

    R7AF's comment on well formed XML is VERY, VERY important.  Most issues with XML systems I have had to fix are due to poorly formed XML.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now