XSD Deserialization Issue

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Using the XSD.exe tool, I created a .net object that represents a google product review feed based on its schemas (http://google.com/products/product_reviews_v1.xsd and http://google.com/products/prs_v1.xsd). After Im done loading up the object
and serialize it back to xml it is both well formed and valid when I pass it thru a validator; however, the formatting of the document does not meet googles specs....
For example,
The xml should contain the tag with a namespace prefix as such: <pr:products> But instead is reflecting <products xmlns="http://schemas.google.com/schemas/pr/1.0 . In order to correct this, I will need to add the following namespace
prefix to the topmost node called feed as such: xmlns:pr="http://schemas.google.com/schemas/pr/1.0"; which I am not sure how to do, and Ill also need to adjust the .net autogenerated class (from the xsd tool) so it will prefix the products tag properly.
Suggestions are greatly appreciated! Im not sure who to blame for this one? Is it the xsd tool that is not working properly or is the xml xsd file just not specific enough which is requiring all these extra steps? If I cant get the xsd
tool to output this file properly Im going to have to do an XSLT on it, which should be completely unnecessary since Im working off of an XSD?
Thanks again



View the full article
 
Back
Top