Hi All,
I want to update an xml file present on a remote server. Since I cannot
update the xml file present on a remote server using C#.net web service I
planned to update it using Infopath. It is a standard xml file which does
not include any PI tags.The file is present at the following location
http://localhost/IDXWebService/info.xml
I have linked this file with the infopath form. When the user opens the
form the user sees the default fields and data available in the xml file.
The user changes the data in the form and now I want to update the xml file
present at the above location.
I know whenever I save the xml data in infopath form it would add those PI
tags and save the file as an infopath form. I dont want that. All I want is
update the existing xml file.
Please let me know if this is possible using InfoPath? If yes can someone
please let me know how?
Thanks & Regards,
-Reetu
Bart - 09 May 2005 07:28 GMT
hello
if i understood ur question
u have a file on the remote server u want to open it in infopath, edit it
and save it back to the remote server
the following code should will do it.
try{
var es = new ActiveXObject("Msxml2.DOMDocument.5.0");
es.load("http://localhost/Aspsite/ConfigXML.xml")
XDocument.UI.Alert(es.readyState);//check to see the xml state if 3
everything is fine
XDocument.UI.Alert(es.xml);
es.somenode=XDocument.DOM.selectSingleNode("xpath").nodeTypedValue;
es.save("http://localhost:9031/AspTestsite/ConfigXML.xml")
// need to be fully trusted
}
catch(e)
{
XDocument.UI.Alert(e.description);
//eventObj.ReturnStatus = false;
}
and can u please tell me why cant u do the same in .net what problems u
faced doing this in .net????
hope this helps
Bart
> Hi All,
>
[quoted text clipped - 18 lines]
> Thanks & Regards,
> -Reetu