Difference between XML Namespace (xmlns) and XML Schema (XSD)?
XML namespaces are used for providing uniquely named elements and attributes in an XML document.
XML Schema is an XML-based alternative to DTD.It describes the structure of an XML document.
A schema describes the structure of the XML: tag names, parent/child relationships, cardinality, types, restrictions, etc.
Namespaces are more like packages in Java: They give you a way to distinguish your tags from others.
You can combine XML streams together. If you and someone else both have a <name> tag, you can have namespace foo, someone else can have namespace bar, and you can tell the difference with <foo:name> and <bar:name>.
XML Schema is an XML-based alternative to DTD.It describes the structure of an XML document.
A schema describes the structure of the XML: tag names, parent/child relationships, cardinality, types, restrictions, etc.
Namespaces are more like packages in Java: They give you a way to distinguish your tags from others.
You can combine XML streams together. If you and someone else both have a <name> tag, you can have namespace foo, someone else can have namespace bar, and you can tell the difference with <foo:name> and <bar:name>.
Comments
Post a Comment