Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2008

Tip: Looking for answers? Try searching our database.

Xpath Structure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Mayer - 12 Feb 2008 15:28 GMT
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.
Greg Collins - 12 Feb 2008 21:15 GMT
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.

Signature

Greg Collins
Microsoft MVP
Visit Braintrove at http://www.braintrove.com
Visit InfoPathDev at http://www.infopathdev.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.