Quantcast
Channel: How can I build XML in C#? - Stack Overflow
Browsing all 10 articles
Browse latest View live

Answer by swdev for How can I build XML in C#?

I think this resource should suffice for a moderate XML save/load: Read/Write XML using C#.My task was to store musical notation. I choose XML, because I guess .NET has matured enough to allow easy...

View Article



Answer by Vincent for How can I build XML in C#?

new XElement("Foo", from s in nameValuePairList select new XElement("Bar", new XAttribute("SomeAttr", "SomeAttrValue"), new XElement("Name", s.Name), new XElement("Value", s.Value) ) );

View Article

Answer by user65199 for How can I build XML in C#?

The best thing hands down that I have tried is LINQ to XSD (which is unknown to most developers). You give it an XSD Schema and it generates a perfectly mapped complete strongly-typed object model...

View Article

Answer by GurdeepS for How can I build XML in C#?

As above.I use stringbuilder.append().Very straightforward, and you can then do xmldocument.load(strinbuilder object as parameter).You will probably find yourself using string.concat within the append...

View Article

Answer by Bob for How can I build XML in C#?

In the past I have created my XML Schema, then used a tool to generate C# classes which will serialize to that schema. The XML Schema Definition Tool is one...

View Article


Answer by Todd for How can I build XML in C#?

For simple cases, I would also suggest looking at XmlOutput a fluent interface for building Xml.XmlOutput is great for simple Xml creation with readable and maintainable code, while generating valid...

View Article

Answer by FlySwat for How can I build XML in C#?

For simple things, I just use the XmlDocument/XmlNode/XmlAttribute classes and XmlDocument DOM found in System.XML.It generates the XML for me, I just need to link a few items together.However, on...

View Article

Answer by Mikael Söderström for How can I build XML in C#?

XmlWriter is the fastest way to write good XML. XDocument, XMLDocument and some others works good aswell, but are not optimized for writing XML. If you want to write the XML as fast as possible, you...

View Article


Answer by Marc Gravell for How can I build XML in C#?

It depends on the scenario. XmlSerializer is certainly one way and has the advantage of mapping directly to an object model. In .NET 3.5, XDocument, etc. are also very friendly. If the size is very...

View Article


How can I build XML in C#?

How can I generate valid XML in C#?

View Article
Browsing all 10 articles
Browse latest View live




Latest Images