troubleshooting Question

Help with parent object using DataContractSerializer

Avatar of Jonthemoon
JonthemoonFlag for Canada asked on
Web Languages and StandardsXMLWCF
2 Comments1 Solution664 ViewsLast Modified:
Hi,

I'm currently using XmlSerializer to put objects in XML. (I then transform the XML and build a document but that's just some context.) So, I try to use a DatacontractSerializer to measure possible performance gains as I find the XmlSerializer is taking a bit too much time.

Everything works excepts that I don't get my Parent object in the XML using the DataContractSerializer as opposed to using the XmlSerializer.

The objects I serialize are in a dbml file build by VS2008.

So, is there a way to get the parents in the Xml with DataContractSerializer?

I want my XML to looks like :
<Part>
    <Item>qwerty</Item>
    <Order>
         <OrderID>123</OrderID>
    </Order>
</Part>
ASKER CERTIFIED SOLUTION
Jonthemoon

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros