[Israel.pm] Starting XML
shlomif at iglu.org.il
Fri Dec 14 02:27:42 PST 2007
On Thursday 06 December 2007, Jason Elbaum wrote:
> I don't know much about XML beyond the basics, but I'd like to be able
> to read some relatively small XML files and extract elements of the
> contents. (I'm still working out what to do with them next. Maybe
> build a database.)
> What's the simplest way to do that? Just about everything XML-related
> I find on the web starts with chapters full of definitions,
> specifications and acronyms. There must be a better way.
> I don't need to write XML files, or to validate them, or to edit them.
> Though browsing them and pretty-printing them may come in handy.
> (If it's not Perlish, I don't mind. Whichever language does it best.)
Here's how I learned what I know of XML:
1. I first read http://www.xml.com/pub/a/98/10/guide0.html which explained the
motivation for XML and its structure.
2. I read an XML::LibXML introduction (it may have been
http://www.xml.com/pub/a/2001/11/14/xml-libxml.html ) and since then have
been happily using XML::LibXML.
3. I read the "Perl and XML" book - http://www.oreilly.com/catalog/perlxml/ -
which is short. Through this book I learned what XPath is about, and other
stuff. It's a short book and is available from the Mongers' library. (I
suppose you can also learn XPath from the zvon.org tutorial).
4. I learned XSLT from http://www.w3schools.com/xsl/ and
5. I also learned about DTD's and how to use them.
This is for Perl. If you want to learn XML mangling in other programming
languages, it may vary somewhat, although the DOM, SAX and XPath APIs are
I personally avoid XML::Evil ^W XML::Evil like the plague and try to use
XML::LibXML (or XML::Parser for legacy code that I have to maintain) for
Shlomi Fish shlomif at iglu.org.il
I'm not an actor - I just play one on T.V.
More information about the Perl