Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging XML documets

Status
Not open for further replies.

nicklieb

Programmer
Oct 17, 2002
383
GB
I am rebuilding an interaction with UPS is .net, was previously built.

In the initial interaction i need to send 2 distinct xml files at once.

in the classic asp, this was done through a string, however in the c# version, i am using XML, and with two XML headers, any XMl parser will reject it because of the two headers.

I am using XmlTextWriter and can send 1 file, and I was wondering if I can send two files one after the other. Is this possible?

Code:
 XmlTextWriter xw = new XmlTextWriter(req.GetRequestStream(), Encoding.UTF8);
                       
            LoginXML.WriteTo(xw);
            myXml.WriteTo(xw);
        
            xw.Close();


I have seen some posts on the internet about using an XSLT, but am thinking that it will just create a large xml document, with the 2 original XML documents as nodes, this is NOT what i want.

Do anyone have any advice or sample code.

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top