![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | msxml question using vbscript/wsh as shown below iterating through list of xml elements is simple enough. For Each node In xmldoc.DocumentElement.Childnodes msgbox "node: " & node.xml Next Assume the node element above has an attribute named ID which is a number. What I need to do is process a list of nodes in the correct order, which is determined by this ID attribute. Whats the simplest way to sort when working with msxml in vbscript? I didn't see any sorting options when reviewing the xpath information, which I use with the SelectNodes method... how do first obtain a sorted collection of nodes to do my For Each on? The transformNode method with xsl? If so could someone provide an example? I've been working with msxml and vbscript recently but havn't touch xsl yet... |
My System Specs![]() |
| | #2 (permalink) |
| | Re: msxml question "James" <noone@xxxxxx> wrote in message news:ubsGFYYKJHA.4772@xxxxxx Quote: > using vbscript/wsh > > as shown below iterating through list of xml elements is simple enough. > > For Each node In xmldoc.DocumentElement.Childnodes > > msgbox "node: " & node.xml > > Next > > Assume the node element above has an attribute named ID which is a number. > What I need to do is process a list of nodes in the correct order, which > is determined by this ID attribute. Whats the simplest way to sort when > working with msxml in vbscript? I didn't see any sorting options when > reviewing the xpath information, which I use with the SelectNodes > method... how do first obtain a sorted collection of nodes to do my For > Each on? The transformNode method with xsl? If so could someone provide an > example? I've been working with msxml and vbscript recently but havn't > touch xsl yet... > > > capability. So either sort the nodes using a standard sort algorithm or transform the document first using XSLT and then select the nodes. This can all be done in memory, no need to actually alter the original. If you need help with the XSLT post a sample XML document. MSXML questions are best asked on microsoft.public.xml. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name |
My System Specs![]() |
| | #3 (permalink) |
| | Re: msxml question ok, thanks. "Joe Fawcett" <joefawcett@xxxxxx> wrote in message news:eNoQHpeKJHA.920@xxxxxx Quote: > > > "James" <noone@xxxxxx> wrote in message > news:ubsGFYYKJHA.4772@xxxxxx Quote: >> using vbscript/wsh >> >> as shown below iterating through list of xml elements is simple enough. >> >> For Each node In xmldoc.DocumentElement.Childnodes >> >> msgbox "node: " & node.xml >> >> Next >> >> Assume the node element above has an attribute named ID which is a >> number. What I need to do is process a list of nodes in the correct >> order, which is determined by this ID attribute. Whats the simplest way >> to sort when working with msxml in vbscript? I didn't see any sorting >> options when reviewing the xpath information, which I use with the >> SelectNodes method... how do first obtain a sorted collection of nodes to >> do my For Each on? The transformNode method with xsl? If so could someone >> provide an example? I've been working with msxml and vbscript recently >> but havn't touch xsl yet... >> >> >> > capability. So either sort the nodes using a standard sort algorithm or > transform the document first using XSLT and then select the nodes. > This can all be done in memory, no need to actually alter the original. If > you need help with the XSLT post a sample XML document. > > MSXML questions are best asked on microsoft.public.xml. > > -- > > Joe Fawcett (MVP - XML) > http://joe.fawcett.name |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| MSXML HTTP get command | VB Script | |||
| MSXML 4.0 | Vista Games | |||
| 3 copies of MSXML 4.0 SP2 ??? | Windows Updates | |||
| MSXML 4.0 SP2 Parse and SDK | Vista performance & maintenance | |||
| getting error message...msxml 4.0 | Vista Games | |||