Home »
Public Forums »
archive »
Re: IDL xpath or similar?
Re: IDL xpath or similar? [message #69832] |
Wed, 17 February 2010 15:02 |
Rob[2]
Messages: 11 Registered: May 2007
|
Junior Member |
|
|
On Feb 17, 11:22 am, Rob <rob.webina...@gmail.com> wrote:
> Is there a built in xpath (or similar) methodology for searching an
> XML document?. I really don't want to build my own parser, nor
> attempt ugly string parsing on an XML document such as this example:http://spidr.ngdc.noaa.gov/spidr/servlet/GetMetadata ?param=iono.WI937
>
> Essentially, I just want to extract a few nuggets of information and
> populate a nested structure whose nodes have the same names as the
> elements in the original XML; for easy structure navigation.
>
> I'd prefer not to involve the JavaBridge because:
> 1) I have a simple package that is easy to use and essentially
> requires no installation procedure and is thus very platform neutral.
> 2) I tried the JavaBridge in the past (for SOAP, etc) and found that
> the complexity it's involvement added to the installation process for
> a package that needed to run on Linux and Windows to be unwieldy and
> beyond the time I had available. In the end, my users community
> shrunk.
>
> The package I'm working on is:https://sourceforge.net/projects/spidr-idl/
>
> R
I sucked it up and got intimate with IDLffXMLDOMDocument's methods.
Example:
o_citeinfo = (oDoc->GetElementsByTagName('citeinfo'))->Item(0)
t_title = (((o_citeinfo->GetElementsByTagName('title'))-
> Item(0))->GetFirstChild())->GetNodeValue()
Thanks Dave.
R
|
|
|
Current Time: Thu Oct 09 12:37:44 PDT 2025
Total time taken to generate the page: 0.08141 seconds