zoukankan      html  css  js  c++  java
  • The Xml basic part

    Today I reviewed the xml part.

    Xml's full name is Extensible Markup Language which produced from SGML(Standard Generalized Markup Language).

    Why do you learn it?

    The xml could store the data and describe the data.For example:

      <Person>

        <name>Peter</name>

        <age>23</age>

      </Person>

    We can see from this little code:

      The code include the Person's info and each parameter has its own value.The Person's filed is so clear.And the data could be get conveniently.

    Xml file start with:

      <? xml version="1.0" encoding="utf-8"?>      in the first line(document assertion)

      <! DOCTYPE demo SYSTEM "demo.dtd" >     document's type definition

      <!-- comment content -->             the comment  

    There should be only one root element in the xml file.And the root element include :

      1.child element

      2.element's parameter

      3.element's text content

      4.CDATA(character data) for example:

        <![CDATA{

          if(2<3){

            System.out.println("hello CDATA!");

          }

        ]]>

      How to remember the CDATA's format?

        <!>  ->  <![]>  ->  <![CDATA[  text content  ]]>

      

       

      

  • 相关阅读:
    Redis 是单进程单线程的?
    LeetCode-114. Flatten Binary Tree to Linked List
    Java HashMap源码分析
    转:zookeeper中Watcher和Notifications
    分布式服务框架
    LeetCode-330.Patching Array
    转:String StringBuffer StringBuilder区别
    最小堆代码实现
    数组的各类排序
    两步建立 ssh 反向隧道
  • 原文地址:https://www.cnblogs.com/ppcoder/p/7138208.html
Copyright © 2011-2022 走看看