Hi Dave,
As for mapping object and xml document, the first thing I can get is the
XMLSerialization, which is the dedicated technique in .NET framework for
class /XML mapping. If the xml schema is not quite complex, you can
directly define the .net class(with XML serialization attributes) or use
the XSD.exe tool to generate the class code from xml file(or xsd schema):
#XML Serialization in .NET
http://www.codeproject.com/KB/XML/xmlserialize.aspx
#XML Serialization in the .NET Framework
http://msdn.microsoft.com/en-us/library/ms950721.aspx
#XML Schema Definition Tool (Xsd.exe)
http://msdn.microsoft.com/en-us/libr...0s(VS.71).aspx
also, with LINQ appearing, it is also very convenient to use LINQ2XML to
manipulate XML document, do some transforming(to different xml format or to
.NET class objects..) especially when you use VB.NET:
http://www.codeproject.com/KB/linq/LINQtoXML.aspx http://blogs.msdn.com/xmlteam/archiv...to-xml-bridge-
classes-to-system-xml.aspx
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: David Thielen <th*****@nospam.nospam>
Subject: XML <-object mapping tool?
Date: Wed, 24 Sep 2008 21:12:53 -0600
>Hi;
I have a small XML file that I need to read/change from my app. Is
there some easy way to map from XML to my objects so I can just read
it in to my objects, change the objects as needed, then write the
whole thing back out?
thanks - dave
david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm