开发者

In XML is a Schema User Created?

开发者 https://www.devze.com 2023-04-05 23:02 出处:网络
if I make an XML Schema; I would physically define that schema correct? Or is there a program somewhere that would create a schema for my XML file automatically? Maybe I am confused on开发者_开发技巧

if I make an XML Schema; I would physically define that schema correct? Or is there a program somewhere that would create a schema for my XML file automatically? Maybe I am confused on开发者_开发技巧 Schemas I'm not sure.


We've used this tool to generate XSD's from example XML files: http://www.thaiopensource.com/relaxng/trang.html. Just remember that it can only be as good as the example XML, so you might have to tweak the generated schema a bit (adding repetition, etc.).


If you already have an XML file created and want to create a schema based off of it, VS 2010 can create one for you based off of the contents of an XML file by opening your XML file in VS and clicking the "Create Schema" button. You can read more here:

http://msdn.microsoft.com/en-us/library/ms255829.aspx

Edit: XML Schemas can be written by hand or generated off of an XML file (which you can then modify by hand if you feel the need to do so)

0

精彩评论

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