-
If it is in InfoPath you need select the xml node and set the value to that node. And bind that xml node to a textbox in the UI.
Code would look like
thisXDocument.DOM.selectSingleNode(...<You need to write the XML XPAth here>...).text = System.Environment.UserName;
Note: Above code in ''c#''.
Agni
InfopathDev India
-
Sorry man the statement should be
XDocument.UI.Alert(''Xml: '' + getEmployeeInfoResultNode.xml);
Just now I realised that ''xml'' should be in lowercase.
Hope this helps.
Agni
InfopathDev India
-
Can you try this please
var getEmployeeInfoResultNode = employeeInfoWS.selectSingleNode(''/dfs:myFields/dfs:dataFields/s0:GetEmployeeInfoResponse/s0:GetEmployeeInfoResult'');
XDocument.UI.Alert(getEmployeeInfoResultNode.Xml);
Look at the xml you are getting here and Look for the XPATH in that xml and give it in the following statement.
var ...
-
First thing is you cannot assign a double value to a string directly.
Other than that everything looks fine for me.
One other thing that could be wrong is your ''XPATH''.
Agni
InfopathDev India
-
Hi Aswin,
My best suggestion for you is, debug your WebMethod (web service) method and look at ''xdd.DocumentElement'' value
in quick watch. This way you will know the what is the xml that you are getting into the Infopath.
With this you can write the Xpath from ''root element'' to the ''leaf element'' you want.
According to my investigation ...
-
1. ''The Microsoft Jet database engine cannot open the file '\\xxx.168.201.16\pfr\Europe\Logistics\Global Metrics\KPI Performance Form.mdb'. It is already opened exclusively by another user, or you need permission to view its data.''
The above lines in your error says that the file is opened by some other person, can you cross check whether some ...
-
In statement
var logHistoryGroup = XDocument.DOM.selectNodes (/my:myFields/my:logHistorySection/my:logHistoryGroup'');
XDocument.DOM.selectNodes gets the array of nodes(IXmlDomNodeList). we cannot add the nodes to this object. Instead we should get the parent node and append children to that node.
so your statement should be
var ...
-
As per your error message, statement that is causing the problem is
''XDocument.UI.Alert(employeeInfoWS.selectSingleNode(''/s0:GetEmployeeInfoResponse/s0:lastName'').text);''
I think xpath in the above statement should be
''/dfs:myFields/dfs:dataFields/s0:GetEmployeeInfoResponse/s0:empDS/s0:Employees/s0:lastName''
or it can be ...
-
It looks like your XML has a prefix of ''my'' so you need to add ''my'' as a prefix to your XML string also. And one more thing you need to take care of is ''CASE of the letters in the XML nodes and starting and end tags''. Try the following xml string it might help you
var sRepeatingXml = ''<my:LogEntries ...
-
Here is one way of adding a new row to the repeating table.
//write get the XML of repeating node into a string
string sRepeatingXml = ''<LogEntries><name>NameValue<name><age>Agevalue</age><LogEntries>'';
//create a Dom for the XMLNode
IXMLDOMDocument oXml = thisXDocument.CreateDOM();
oXml.async = ...