帮助在.NET 2.0中创建XML文档 [英] Help Creating an XML document in .NET 2.0
问题描述
目前我正在使用.NET 2.0。我是创建XML文档的新手。第一次创建这个时我想要一些帮助。我知道你可以做像doc.CreateElement这样的东西,但我不明白当你添加元素等时嵌套的东西。
这里是要创建的XML:
< Envelope>
< Body>
<收件人>
< LIST_ID> 45654< / LIST_ID>
< EMAIL> someone@domain.com< / EMAIL>
< COLUMN> < br>< NAME> SSN< / NAME>
< VALUE> 123-45-6789< / VALUE>
< / COLUMN>
< /收件人>
< / Body> ;
< / Envelope>
C#Web Developer
Currently I'm using .NET 2.0. I am new to creating XML Documents. I wanted a bit of help the first time around creating this. I know you can do stuff like doc.CreateElement but I don't understand how things are nested when you add elements, etc.
Here's the XML to be created:
<Envelope>
<Body>
<Recipient>
<LIST_ID>45654</LIST_ID>
<EMAIL>someone@domain.com</EMAIL>
<COLUMN>
<NAME>SSN</NAME>
<VALUE>123-45-6789</VALUE>
</COLUMN>
</Recipient>
</Body>
</Envelope>
C# Web Developer
推荐答案
看一下XmlDocument的其他成员类。我敢打赌,你会在方法列表顶部附近找到问题的答案。
Take a look at the other members of the XmlDocument class. I bet you find the answer to your question near the top of the list of methods.
这篇关于帮助在.NET 2.0中创建XML文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!