How can I write the code about getting the data by using a data

  • Thread starter How can I write the code
  • Start date
H

How can I write the code

Hi all:

I created a Data Connection “UXP†by using the Wizard, the information of
the data connections is as follows:

Note: The data source is a SharePoint List

I want to know how I can get the data of the SharePoint List when I click a
button.

How Can I write the code?

public void Connect_OnClick(DocActionEvent e)

{

//I want to get the data of the SharePoint List by using the “UXP†Data
Connection

}
 
S

S.Y.M. Wong-A-Ton

How about the following?
---
thisXDocument.DataObjects["UXP"].Query();
IXMLDOMDocument2 xmlDOM =
(IXMLDOMDocument2)thisXDocument.DataObjects["UXP"].DOM;
/* xmlNamespaces lists all relevant namespaces XPath needs for retrieval.
You can find them by retrieving thisXDocument.DataObjects["UXP"].DOM.xml and
copying all the namespaces listed in this XML string */
string xmlNamespaces =
"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\"";
xmlDOM.setProperty("SelectionNamespaces", xmlNamespaces);
// Retrieve nodes using XPath
IXMLDOMNodeList nodes = xmlDOM.selectNodes("//dfs:YourUXPXMLNode");
 

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