Focal Point
count in Xpath not working.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/73010762

March 02, 2009, 02:45 PM
ray_In_Vancouver
count in Xpath not working.
running this xpath '_count(xpath(//detail))' setting a property against a doc like
  
<?xml version="1.0" encoding="UTF-8"?>
<document>
	<header>
		<so_nbr>S401352</so_nbr>
		<so_print>11/14/08</so_print>
		<so_due_date>11/17/08</so_due_date>
		<so_ord_date>11/14/08</so_ord_date>
		<so_po/>
		<company1.</company1>
		<company2>1730</company2>
		<company3></company3>
		<company4>CANADA</company4>
		<company5/>
		<company6/>
		<so_bill>R92270</so_bill>
		<billto_name>E</billto_name>
		<billto_line1>3914 32ND STREET</billto_line1>
		<billto_line2/>
		<billto_line3/>
		<billto_country></billto_country>
		<billto_city>VERNON</billto_city>
		<billto_state>BC</billto_state>
		<billto_zip>V1T 5P1</billto_zip>
		<so_ship>R92270</so_ship>
		<shipto_name>V/shipto_name>
		<shipto_line1></shipto_line1>
		<shipto_line2/>
		<shipto_line3/>
		<shipto_country></shipto_country>
		<shipto_city></shipto_city>
		<shipto_state></shipto_state>
		<shipto_zip></shipto_zip>
		<so_rmks></so_rmks>
		<document_type>SALESORDER</document_type>
		<document_number>S401352</document_number>
		<submit>0</submit>
		<litterDeposit>    0.00</litterDeposit>
	</header>
	<detail>
		<sod_nbr>S401352</sod_nbr>
		<sod_star/>
		<sod_line>1</sod_line>
		<pt_article>10776545995176</pt_article>
		<batch_code/>
		<input_qty>*</input_qty>
		<sod_custpart>518548</sod_custpart>
		<sod_price>167.88</sod_price>
		<sod_disc>8.696</sod_disc>
		<deliveryDate>11/19/08</deliveryDate>
		<ship_qty>     1</ship_qty>
		<sod_um>CS</sod_um>
		<pt_desc1>07 5V CHARD B88 750/12 </pt_desc1>
		<sod_site>200</sod_site>
		<sod_loc>B</sod_loc>
		<locdesc>1</locdesc>
		<ship_wt>35.49</ship_wt>
		<ship_wt_um>LB</ship_wt_um>
		<document_number>S401352</document_number>
		<sod_part>776545995179</sod_part>
	</detail>
	<footer>
		<total_qty>      1</total_qty>
		<total_wt>35.49</total_wt>
	</footer>
</document>

XML parser does not return count.


thanks

This message has been edited. Last edited by: ray_In_Vancouver,
March 05, 2009, 01:20 PM
ESky
Should the XPATH be XPATH(//*detail)?


iWay adapter manager
SAP Adapter
Web Services
SAP BASIS, Java Core
March 18, 2009, 12:19 PM
ray_In_Vancouver
nope

tried _count, _Xpath(count(...)

still not working.


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
March 19, 2009, 12:21 PM
AdeH
Hi,
I'm having success with your document using an SREG agent to set an SREG to:

_count(XPATH(/document/detail))

I've also just got the right result using:

_count(XPATH(//detail))


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
March 19, 2009, 05:28 PM
Clinton Side-Kick
I found two posible errs in your input doc:
< company1.< /company1> should be
< company1>.< /company1>
< shipto_name>V/shipto_name> should be
< shipto_name>V< /shipto_name>

Just wondering...


--------------------------------------------------------------------------------
prod: WF/AS 8.2.05; OmniGen;
In FOCUS since 1991
August 20, 2009, 11:32 PM
ray_In_Vancouver
solved


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server