`
sakakokiya
  • 浏览: 484426 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

 XML Core - Basic

阅读更多
General Principles Define the purpose of XML:
  • why the standard was created
  • the intended applications of XML (data exchange, structured data representation)
  • limitations of XML:
    • XML Syntax
    • XML Usage
    • Types of data that can and cannot be stored in XML
Vocabulary Be comfortable with XML terminology:
  • start tag / end tag
  • element, root element, empty element
  • attribute
  • document, standalone document
  • processing instruction
  • declaration instruction
Document Structure
  • Describe an XML document using declaration instructions like
<?xml version="1.0" encoding="US-ASCII" standalone="yes" ?>

  • Follow the basic rules of XML document structure:
    • The declaration instruction is optional
    • All documents must have a single root element
  • Write processing instructions:
<?cmd arg="val" ?>

Elements
  • Distinguish valid element names from invalid ones.
  • Use the element syntax to define start and end tags (<test></test>).
  • Use the short notation for empty elements (<myelement/>).
Attributes
  • Distinguish valid attribute names from invalid ones.
  • Add attributes to an element using the allowed delimiters (' as well as ").
  • Realize that attributes must be unique within an element, and that they are unordered.
Well-Formedness Explain the meaning and purpose of each concept:
  • Well-formedness is mandatory (if a document is not well-formed, it is not an XML document)
  • Elements must be properly nested (not crossed: <a><b></a></b>)
  • Proper usage of whitespace
Text
  • Combine markup, text and whitespace within an XML document
  • Classify XML content as
    • Markup
    • Character Data (CDATA), including CDATA sections (<![CDATA[ 4+5 < 5+5 ]]>)
Namespaces
  • Avoid ambiguous element names using namespaces
  • Declare a namespace using xmlns
  • Override the default namespace using xmlns
  • Understand the notion of a qualified (element) name.
Comments Add comments to an XML document:
  • using the proper syntax
  • in any valid location within the document
Entities

Explain the purpose of the built-in entities:

  • < (<)
  • > (>)
  • & (&)
  • ' (')
  • " (")

Insert a unicode character using decimal or hexadecimal notation:

  • Ӓ (decimal)
  • ꯍ (hexadecimal)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics