I have XML file and i am genrating Datset from it
DataSet ds = new DataSet();
ds.ReadXml(new XmlTextReader(new StringReader(strMasterSqlXML))); //strMasterSqlXML is XML string
I have XSD file and i want to validate that dataset se开发者_运维技巧t by XSD file to check datatype and relations, if it's possible by direct xml validation or by dataset i am ready to implemt.
Give me idea...
Try looking into JAXB. From your xsd it will generate java classes that you can uses to populate your dataset with simple methods. From there you can validate and write to an XML file with ease.
jaxb.java.net
精彩评论