开发者

Validate dataset using XSD file

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜