Explore XML
Explore XML
XML is a software- and hardware-independent tool for storing and transporting data.
XML Does Not Use Predefined Tags
XML Tree
Root Element (Parent)
Element (Child) - Attribute
* Element (Sibling)
Text
<root> <child> <subchild>.....</subchild> </child> </root>
Self-Describing Syntax
XML Syntax Rules
XML Documents Must Have a Root Element
The XML Prolog
* <?xml version="1.0" encoding="UTF-8"?>
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
XML Elements Must be Properly Nested
XML Attribute Values Must be Quoted
White-space is Preserved in XML
XML Element - An element can contain:
text
attributes
other elements
a mix of the above
Empty elements can have attributes.
XML Naming Rules
Element names are case-sensitive
Element names must start with a letter or underscore
Element names cannot start with the letters xml (or XML, or Xml, etc)
Element names can contain letters, digits, hyphens, underscores, and periods
Element names cannot contain spaces
XML Namespaces - XML Namespaces provide a method to avoid element name conflicts.
XPath Path Expressions - XPath uses path expressions to select nodes or node-sets in an XML document. These path expressions look very much like the expressions you see when you work with a traditional computer file system.
XSLT (eXtensible Stylesheet Language Transformations) is the recommended style sheet language for XML. - With XSLT you can transform an XML document into HTML.
XQuery is About Querying XML - XQuery is a language for finding and extracting elements and attributes from XML documents.