* smithb1028 wrote in microsoft.public.dotnet.xml:
>I would like to create an XML structure like so:
<Root>
<Reasons>
<Reason>value1</Reason>
<Reason>value2</Reason>
</Reason>
</Root>
I fugured start with a string[] like so:
string[] reasons = new string[] { "value1", "value2" }
and then use a foreach to make each element. Can anyone help me out
here?
There are very many ways to create XML documents, you can simply print
them character for character, you can use an XmlWriter, you can use the
serialization features, you can create an in-memory tree using, say,
XmlDocument, any many more. You are not providing any information that
would help us help you pick one of them suitable for your problem, and
so there is little we can help you out with here.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de ·
http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·
http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 ·
http://www.websitedev.de/