Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    count in Xpath not working.
Go
New
Search
Notify
Tools
Reply
  
count in Xpath not working.
 Login/Join
 
Gold member
posted
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,
 
Posts: 85 | Registered: February 27, 2009Reply With QuoteReport This Post
Member
posted Hide Post
Should the XPATH be XPATH(//*detail)?


iWay adapter manager
SAP Adapter
Web Services
SAP BASIS, Java Core
 
Posts: 22 | Registered: January 15, 2008Reply With QuoteReport This Post
Gold member
posted Hide Post
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
 
Posts: 85 | Registered: February 27, 2009Reply With QuoteReport This Post
Gold member
posted Hide Post
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
 
Posts: 59 | Location: Birmingham, Blighty | Registered: October 30, 2007Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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
 
Posts: 105 | Location: United Kingdom | Registered: February 07, 2008Reply With QuoteReport This Post
Gold member
posted Hide Post
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
 
Posts: 85 | Registered: February 27, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    count in Xpath not working.

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.