xpath expression Home Page › Forums › BizTalk 2004 – BizTalk 2010 › xpath expression This topic has 5 replies, 1 voice, and was last updated 8 years, 4 months ago by community-content. Viewing 1 reply thread Author Posts January 24, 2007 at 10:04 AM #17401 community-content Hi, I am trying to retrieve all the books nodes with an an interact value of 104.from the following xml. Am doing this within the expression shape. But getting exceptions like "Expression must evaluate to node set etc" Please help. <Parent1> <childBooks> <childBook> <interact>104</interact> <books> <book> <author>SomeBook</author> </book> <book> <author>SomeOtherBook</author> </book> </books> </childBook> <childBook> <interact>105</interact> <books> <book> <author>SomeBook</author> </book> <book> <author>SomeOtherBook</author> </book> </books> </childBook> </childBooks></Parent1> January 24, 2007 at 10:24 AM #17403 community-content please kindly post the expression you are using. -wa January 24, 2007 at 2:05 PM #17405 community-content i was trying this /*[local-name()='Parent1']/*[local-name()='childBooks']/*[local-name()='childBook']/*[local-name()='interact'='104']/*[local-name()='books'] January 25, 2007 at 8:42 AM #17422 community-content Here is the error in your construct, onlybiz, *[local-name()='interact'='104'] I think this may have been what you intended: /*[local-name()='Parent1']/*[local-name()='childBooks']/*[local-name()='childBook']/*[local-name()='books'][../interact = '104']/* – wa January 25, 2007 at 8:44 AM #17423 community-content Also, I should have mentioned this one: //*[local-name()='books'][../interact = '104']/* This finds all books nodes across the document that have an interact value of 104 -wa January 26, 2007 at 10:04 AM #17444 community-content Thanks for your replies. the expression got crazy trying to put in the namespaces and local-name's stuff. but whew it worked. Author Posts Viewing 1 reply thread The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies. Log in / Register