adrianxw has asked for the wisdom of the Perl Monks concerning the following question:
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'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using the result from XML::XQL::solve
by davorg (Chancellor) on Oct 27, 2006 at 13:48 UTC | |
by adrianxw (Acolyte) on Oct 28, 2006 at 15:13 UTC |