Skip to Main Content
C# Cookbook, 2nd Edition
book

C# Cookbook, 2nd Edition

by Jay Hilyard, Stephen Teilhet
January 2006
Intermediate to advanced content levelIntermediate to advanced
1184 pages
43h 23m
English
O'Reilly Media, Inc.
Content preview from C# Cookbook, 2nd Edition
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Putting Together an XML Document
|
861
See Also
See the “XmlDocument Class,” “XmlElement Class,” and “XmlAttribute Class” top-
ics in the MSDN documentation.
15.10 Putting Together an XML Document
Problem
You have various pieces of a document in XML form that need to be put together to
form a single XML document—the opposite of what was done in Recipe 15.9. In this
case, you have received various pieces of an invoice in XML form. For example, one
department sent the shipping information as an XML document, one sent the billing
information in XML, and another sent invoice line items, also as an XML document.
You need a way to put these XML pieces together to form a single XML invoice
document.
Solution
In order to reconstitute the original invoice, you need to reverse the process used to
create the pieces of the invoice using multiple
XmlDocuments. There are three parts
being sent back to you to help in re-forming the original invoice XML:
BillingEnvelope.
xml
, ShippingEnvelope.xml, and Fulfillment.xml. These are listed below:
BillingEnvelope XML
<BillingEnvelope invoiceDate="2003-10-05" invoiceNumber="INV-01">
<billInfo>
<name>Beerly Standing</name>
<attn>Accounting</attn>
<street>98 North Street</street>
<city>Intox</city>
<state>NH</state>
</billInfo>
</BillingEnvelope>
ShippingEnvelope XML ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# Cookbook

C# Cookbook

Joe Mayo
C# Cookbook

C# Cookbook

Stephen Teilhet, Jay Hilyard
Head First C#, 4th Edition

Head First C#, 4th Edition

Andrew Stellman, Jennifer Greene

Publisher Resources

ISBN: 0596100639Supplemental ContentCatalog PageErrata