Xpath Structure

P

Paul Mayer

I have a question about contructing the Xpath in the
XDocument.DOM.selectSingleNode(Xpath)

My node looks like the following:
+MyFields
-queryFields ' Group from connection
-q:Leads
LeadNo
-dataFields
-d:Leads
LeadNo
-my:MyData ' My data elements
MyStart ' Date field
MyEnd ' Date field

Can some one show me what the xpath should look like for
the MyStart varible is should be putting in the selectSingleNode
statement. Can someone briefly explain how to construct the Xpath
statments for the data connection and other group elements.
 
G

Greg Collins

If you are using InfoPath 2007, you can just right-click on the node and
copy the XPath to the clipboard.

If you are using InfoPath 2003, you will need to know what the correct
namespaces are... but it looks like from your example that you would use:

"/my:MyFields/my:MyData/my:MyStart"

But it could be that not all nodes are using the my: namespace... in that
case you need to find out what each node's correct namespace is and make
sure to use that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top