Best way for reading xmlfile to entity/entitycollection?

Posts   
 
    
gregkuha60
User
Posts: 47
Joined: 23-Jan-2012
# Posted on: 13-Mar-2012 18:09:33   

Hello

I would like to have some suggestion how to best import already validated xml files from a "thirdparty vendor". Containing my desired entitys for saving.

My thoughts is to give a schema (xsd) based on my EntityCollection to the vendor. Then i can use the readxml for creating my entitycollection and save to database.

How can i create a shema file for supplying my vendor with a schema based on entity collection? Any suggestions to achieve this?

//best thanks greg

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Mar-2012 11:23:58   

I guess you can just use WriteXML() to get a sample XML file, and then use XSD.exe to generate the XSD schema.

http://msdn.microsoft.com/en-us/library/x6c1kb0s(v=vs.100).aspx