Re: [xsl] Navigating XML when loaded using Javascript.

Subject: Re: [xsl] Navigating XML when loaded using Javascript.
From: António Mota <amsmota@xxxxxxxxx>
Date: Wed, 23 Feb 2005 18:50:34 +0000
I don't quite understand what you're doing, but i'm using Javascipt
(cross-browser open-source project Sarissa) and i get what i want from
the xml doc by using xpath, like in

var nodes = xmlDoc.selectNodes("(//Menu)["+pos+"]/ancestor-or-self::Menu/MenuTitulo");

Hope it helps at least a little...


On Wed, 23 Feb 2005 10:30:22 -0800, Adam_Wetch@xxxxxxxxxxxxxxx
<Adam_Wetch@xxxxxxxxxxxxxxx> wrote:
> 
> 
> I am new to the xsl list, but it appears to be a very informative and
> helpful place. Hopefully i can find some help.
> 
> I am loading some xml using javascript, but cannot figure out how to
> navigate it properly.  I can do it with a data island, but for some reason
> cannot quite get it to work when loading it with javascript.
> 
> Here is some of the loading javascript:
> 
>         XMLdata="file.xml";
>         XMLfile = new ActiveXObject("MSXML2.DomDocument");
>         XMLfile.async = false;
>         XMLfile.setProperty("SelectionLanguage", "XPath");
>         XMLfile.validateOnParse = false;
>         XMLfile.resolveExternals = false;
>         XMLfile.load(XMLdata);
> 
> Just to give an example of how I am doing it.
> 
> Previous data island code:
> <xml id="XMLfile" src="file.xml">
> 
> Previously I would use an external javascript file with somthing like:
> 
>         XMLfile.recordset.moveLast();
>         currentRecord = XMLfile.recordset.recordcount - 1;
> 
> etc...
> 
> Any ideas?

Current Thread