XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Yitzhak KhabinskySubject: XPATH behavior
Author: Yitzhak Khabinsky
Date: 29 Aug 2003 09:18 AM
My SS version is 5.0, build 127b.
I am experiencing strange behavior of the XPATH.
My xml file is in the attachment.
XPATH expressions I am trying to run:
//Offers
count(//Offers)
etc.
always give me 0 (zero) hits in the Query Output window.

I discovered that if remove xmlns="urn:http://www.merchant.shopmsn.microsoft.com/offerschema.xml" attribute, XPATH expressions are working properly.

Is it a bug in the SS?

Thanks,
Yitzhak Khabinsky


Documentfafa.xml

Postnext
Yitzhak KhabinskySubject: XPATH behavior
Author: Yitzhak Khabinsky
Date: 29 Aug 2003 12:56 PM
After some investigation I came across the following URL, which provides some clues:

"None of my XPath select statements will work going against an XML file with a default namespace. Help! "
http://www.topxml.com/people/bosley/defaultns.asp

Regards,
Yitzhak Khabinsky

Postnext
Ivan PedruzziSubject: XPATH behavior
Author: Ivan Pedruzzi
Date: 30 Aug 2003 11:31 PM
The following expression is more elaborate but should do it

/BizTalk/Body/*/*[local-name()='Offer' and namespace-uri()='urn:http://www.merchant.shopmsn.microsoft.com/offerschema.xml']

Ivan

Posttop
Yitzhak KhabinskySubject: XPATH behavior
Author: Yitzhak Khabinsky
Date: 02 Sep 2003 07:49 AM
Thanks.
This XPATH expression has worked.
It so verbose...

Thanks again,
Yitzhak Khabinsky

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.