login about faq

I have found the samples very helpful in extracting values from xml documents. I am using the ActiveX, XML Parser Component. Unfortunately, I have not had success in extracting values the "material" section from the example below. Specifically, I am trying to pull out the value, <amount> value, and <value's unit value ("lb") for the two material sections. Here is an example of the expected values:

m223412, 4250, lb m532235, 4530, lb

How do I extract the value and attribute with a vbscript?

<send_batch> <ticket>10-01A</ticket> <cpticketid>21671</cpticketid> <cpbatchid>47183</cpbatchid> 2 <start_datetime>2013-06-14T14:37:27</start_datetime> <recipecode>R105025</recipecode> <recipeinstance/> <truckcode>T234</truckcode> <amount unit="m3">3</amount> <materials> <material> m223412 <bin>A1</bin> <hopper>96052</hopper> <target unit="lb">4240</target> <targetadjusted unit="lb">4240</targetadjusted> <amount unit="lb">4250</amount> <moisture unit="%">1</moisture> <density unit="kg/m3">2640</density> </material> <material> m532235 <bin>A7</bin> <hopper>96052</hopper> <target unit="lb">4540</target> <targetadjusted unit="lb">4540</targetadjusted> <amount unit="lb">4530</amount> <moisture unit="%">1</moisture> <density unit="kg/m3">2640</density> </material> </materials> </send_batch>

asked Jun 20 '13 at 07:35

wrh's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 20 '13 at 07:35

Seen: 3,570 times

Last updated: Jun 20 '13 at 07:35

powered by OSQA