Hi,

I want to publish a small subset of data held in a large compressed XML file residing on a remote Linux server, in a CGI script. The CGI stuff is trvial once I have the data in a standard form.

I have written enough to get the file from the server, and expand it so that I have the full XML in a memory buffer. In principle, I can now extract the necessary with stuff I know.

Having browsed W3C, it seemed like XQL may be a good way to go however. So I've loaded the buffer into a DOM, (I am sure this has worked as when I do a test $dom->printToFile with a gash filename, it produces a file with the correct contents).

I have past a simple test XQL statement to XML::XQL::solve. I don't know if this has worked however. I get no error, but neither do I know what to do with the result. The docs say it returns a @list, but not what of! I've googled about, browsed various sites which all seem to be mirroring the same stuff, even the pod that is inside the package doesn't help.

Ultimately, what I'd like to do is extract the very few XML items I am interested in into a smaller DOM, then use some more XQL to extract and load these items and a few of their child items into a simple tab seperated $string to pass to an existing sub-system for processing prior to use in the CGI.

Yes, I could do it the old way, but I'm intruiged to get this XQL interface working. What is that @list, and how can I progress this? Input gladly accepted. Thanks.

2006-10-28 Retitled by GrandFather, as per Monastery guidelines
Original title: 'XML::XQL::solve'


In reply to Using the result from XML::XQL::solve by adrianxw

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.