What is on the first line of an XML Schema (XSD)? -


so before write xml schema, lot of tutorials use this:

 <?xml version='1.0'?> 

or

 <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <data-set xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> 

my question is, part for? website , why use it? there other methods this?

if helps, doing convert excel worksheet xml.

xml declaration

<?xml version='1.0'?> xml declaration , not particular xsds xml documents in general.

[definition: xml documents should begin xml declaration specifies version of xml being used.]

as xsd xml document, may have xml declaration.

here bnf of xml declaration (xmldecl) links definitions of constituent parts:

xmldecl ::= '<?xml'versioninfo encodingdecl? sddecl? s? '?>'

note: only 1 xml declaration permitted in well-formed xml, , must @ top if anywhere. if violate requirement, you'll see error such

the processing instruction target matching "[xx][mm][ll]" not allowed.

and you'll have fix problem before xml well-formed.


xml schema instance namespace

xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" namespace declaration special xml schema instance namespace. namespace uri, it's purpose facilitate control of grouping of component name. an xml namespace uri not have retrievable.

see also


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -