XML基本語法規則

XML組成的最小單位為element:

1. start tag
2. value
3. end tag

XML語法規則:

1. every start-tag must have a matching end-tag , or be a self-closing tag
2. tags can’t overlap; elements must be properly nested
        – close the child elements before you close their parents
3. XML documents can have only one root element
4. Obey XML naming conventions
        – start with letter or the dash
        – after first charcter , number, hyphens, perods are allowed
        – Names can’t contain spaces
        – Names can’t contain the colon character
        – Names can’t start with the letters xml(xml, XML, Xml)
        – no space after the opening < character
5. XML is case sensitive
6. XML will keep whitespace in your PCDATA

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s