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 / May 2005

Tip: Looking for answers? Try searching our database.

Editing xml file using Infopath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reetu Agarwal - 06 May 2005 20:14 GMT
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
 
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.