all groups > dotnet xml > august 2006 >
You're in the

dotnet xml

group:

Embedd XML string within another XMl Document



Embedd XML string within another XMl Document Joe
8/30/2006 8:41:35 AM
dotnet xml: Hi

I am trying to build a XML db and within this I want to store an XML string
as 1 element
as "Info" below

If I build up a XMLDocument with data - how can I transform it to a string
containing &lt &gt so I can
put it into my main XML document

Thanks



<?xml version="1.0" standalone="yes"?>
<carsDS xmlns="http://www.tempuri.org/carsDS.xsd">
<CarScheduling>
<AllDay>false</AllDay>
<CarId>3</CarId>
<Description>Wash this car in the garage</Description>
<EndTime>2005-07-20T09:00:00-04:00</EndTime>
<EventType>3</EventType>
<ID>1</ID>
<Label>2</Label>
<Location>Garage</Location>
<Info>&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;RecurrenceInfo Id="51c81018-53fa-4d10-925f-2ed7f8408c75" Index="4"
/&gt;</Info>
<StartTime>2005-07-20T01:30:00-04:00</StartTime>
<Status>1</Status>
<Subject>Wash</Subject>
</CarScheduling>
</carsDS>

Re: Embedd XML string within another XMl Document Glenn
9/7/2006 5:00:28 PM
Joe

You can imbed other XML documents into your, namespaces allowing, using
XmlDocument.ImportNode. The other way to do it would be using a CDATA
sections to store the XML as is.

HTH

Glenn
[quoted text, click to view]

AddThis Social Bookmark Button