Hi,
Here is my xml
I want to know how many 'problem' within one <record></record>. Can someone please provide sample code?
In my first <record>, there are 2 problems. Here is what I try and it did not show 2.
Thanks.
Here is my xml
Code:
<data>
<customername>522000 ABC CO</customername>
<filelisting>
<record>
<problemblock>
<problem>Arrival Notice Missing</problem>
<probopn>01/08/07</probopn>
<probcls>01/08/07</probcls>
<problem>A/N Rec'd after cargo arrival</problem>
<probopn>01/12/07</probopn>
<probcls>01/12/07</probcls>
</problemblock>
<vendorblock>
<vendor>ZHENG YONG GARMENT FACTORY CO LTD</vendor>
</vendorblock>
</record>
<record>
<problemblock>
<problem>Arrival Notice Missing</problem>
<probopn>01/10/07</probopn>
<probcls>01/10/07</probcls>
</problemblock>
<vendorblock>
<vendor>CHU HSING GARMENT (CAMBODIA) CO LTD</vendor>
</vendorblock>
</record>
<morerecords>YES</morerecords>
</filelisting>
</data>
I want to know how many 'problem' within one <record></record>. Can someone please provide sample code?
In my first <record>, there are 2 problems. Here is what I try and it did not show 2.
Code:
set nodelist3 = record.selectNodes("//record/problemblock/problem")
response.write(nodelist3.length)
response.end
Thanks.