Sort XML file based on XSD format in .Net -
I need to generate XML, validate against XSD and (if valid), then XML Send.
My problem is that creating the nodes of the XML file in the correct order (as the XS defines it) is very difficult with my current scenario, manually correcting nodes To add code, there will be a lot of code to write code, as well as an update, if XSD changes (which it now comes later)
XSD is quite complex Element Reforms & Groups Sequences within the issues and complex types.
Unfortunately, I can not add an example because XSD (and XML) is considered "company secrets".
What I would like to know is that there is no way to sort nodes in XML according to definitions in XSD?
Nobody has ever heard or seen about such a ceremony. Net world or otherwise? Does anybody have any idea where to solve this problem?
Without knowing more, this is a bit difficult to say, but here's how I The problems are addressed in the past.
Run through the console, point it to your XSD and use the classes switch (you'll have to look at the documentation, but it's not difficult). From this, a XmlSerializable class
Then you will write something to convert from your existing class to XSD class, then you can serial XML.
Comments
Post a Comment