I would like to be able to create VBscript function that takes in one parameter. Maybe something like this:
createArray(id)
Given the xml sample file below if I gave the function "createArray(10507)" I would like it to build an array of all the childNode id's.
myArray = array(10511, 10512, 10513, 10514, 10515)
From an xml file like this sample:
<site id="10500" level="0" parent="" label="Home" href="javascript:nodelink(
10500)">
<section id="10501" level="1" label="Flights" href="javascript:nodelink(
10501)"></
section>
<section id="10502" level="1" label="Hotels" href="javascript:nodelink(
10502)"></
section>
<section id="10503" level="1" label="Cars" href="javascript:nodelink(
10503)"></
section>
<section id="10504" level="1" label="Crusies" href="javascript:nodelink(
10504)"></
section>
<section id="10505" level="1" label="Vacations" href="javascript:nodelink(
10505)"></
section>
<section id="10506" level="1" label="Specials" href="javascript:nodelink(
10506)"></
section>
<section id="10507" level="1" label="About Us" href="javascript:nodelink(
10507)">
<section id="10511" level="2" label="Employment" href="javascript:nodelink(
10511)"></
section>
<section id="10512" level="2" label="News & Events" href="javascript:nodelink(
10512)"></
section>
<section id="10513" level="2" label="Testimonials" href="javascript:nodelink(
10513)"></
section>
<section id="10514" level="2" label="Specialties" href="javascript:nodelink(
10514)"></
section>
<section id="10515" level="2" label="Our Locations" href="javascript:nodelink(
10515)"></
section>
</section>
<section id="10508" level="1" label="Postcards Magazine" href="javascript:nodelink(
10508)"></
section>
<section id="10509" level="1" label="Contact Us" href="javascript:nodelink(
10509)"></
section>
<section id="10510" level="1" label="Privacy Policy" href="javascript:nodelink(
10510)"></
section>
<section id="10517" level="1" label="Travel Services" href="javascript:nodelink(
10517)"></
section>
</site>
Thank you for your help. I'm stuck.
Start Free Trial