XML Schema and XML in one file? [duplicate]
This question already has an answer here: Is it possible to use XML Schemas internally, just like DTDs? 2 answers Can I put my XML and XML Schema in one file? Or the schema has to be separate file? Im new to XML I have noticed from tutorials that they have an XML file (.xml) and a separate XML Schema file (.xsd). Am I understanding this correctly?
Yes you can have xsd and xml in a same file such declaration is called as Inline Schema definition. But as per general practice they are kept outside for many reasons, one of the very famous reason is: Reusablility Lets say you want to generate the sample xml/POJOs from the xsd for later.(Applies only for Java) (example JAXB) Also as a best practice one should break the complex xsd into smaller xsd for easy to read and understand + flexibility of plugin the xsd required in a given case.
REST call in vb.net: how to pass the key “file” that works in cURL
XML editor for OSX?
What is meant by modularity in an XML schema? [closed]
SVG Image - XML Parsing Error: not well-formed
Can I use xinclude and entities in the same XML file?
Correct schema for XML message with header and multiple body types
(XML) The markup in the document following the root element must be well-formed. Start location: 6:2
XmlPullParserException: Unexpected token
use & symbol in URL Link in .XML
Recursive element in XML
Quickbooks OAuth - Getting started guide and API reference - where can I find them [closed]
Specify a multi-word enumeration value in an XML/DTD
Paypal / Flash button integration as3 problems
xslt grouping issue
Importance of indenting XML file [closed]
Xquery using FLWOR Expression Query