Documentation for the parser? Which one is that if I may ask? perldoc XML::LibXML prints something that definitely doesn't fit a single page and ... doesn't tell me anything of use. perldoc XML::LibXML::Parser doesn't fit on a single page either and ... OK, it explains how I turn the XML into a maze of interconnected objects. It says that I can use it to parse not only XML, but also HTML and SGML and god knows what else. It doesn't say anything about what the heck am I supposed to do with the maze of objects. It doesn't even care to tell me what's the $doc all those tons of methods return. Nada, nil, nothing. So back to the XML::LibXML docs ... OK, XML::LibXML::Document looks promising, perldoc XML::LibXML::Document. 43 methods (if I did not loose count somewhere in the muddle). Maybe more because maybe the object inherits methods from some other but ... no info about that in the docs either ... basically looking at the docs seems the only way to get at the data is to call the ->documentElement() and then ... OK, maybe what I get is a XML::LibXML::Element or something. Or maybe I could call ->getElementsByTagName() but ... "Implements the DOM Level 2 function" now what the fsck is that? You call that documentation?

And XPath? Where's that even just mentioned in the docs? Oh, I see. The start of the description:

This module is an interface to the gnome libxml2 DOM and SAX parser and the DOM tree. It also provides an XML::XPath-like findnodes() interface, providing access to the XPath API in libxml2.
So what docs am I supposed to find and read? If anything I just installed a Perl module XML::LibXML, not some, what was it, gnomio&juliet libxml2. And a XML::XPath-like? How much alike? Where do I find the docs? So am I supposed to use XML::XPath instead or what?

No guys, really, I did look at XML::LibXML a few years ago and tried to learn how to use it, but hey ... I had some work to do, I did not have time to search docs hardly mentioned in these and then other docs and then god only knows what else. Some time later I tried to see what would it take to change XML::Rules to use the universally hailed SAX instead of the good old XML::Parser::Expat, but ... maybe the docs make sense to someone, they did not make any to me.

For someone who had to learn all that XAnythingYouCanThinkOf and DOM nonsense for other languages, the docs of XML::LibXML may contain all info they need. Or at least enough to get them started. For others it's one of the least helpfull documentation found for a Perl module.

Jenda
Enoch was right!
Enjoy the last years of Rome.


In reply to Re^6: Is there any XML reader like this? by Jenda
in thread Is there any XML reader like this? by ashok.g

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.