Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
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: 87 | Registered: February 27, 2009Report 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, 2008Report 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: 87 | Registered: February 27, 2009Report 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, 2007Report 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: 104 | Location: United Kingdom | Registered: February 07, 2008Report 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: 87 | Registered: February 27, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders