XML Basic
XML声明:
<?xml version="1.0" encoding="UTF-8"?>
XML中属性的value值要被引号(单引号or双引号)引起来,如:
<note date="12/11/2007"> <to>Tove</to> <from>Jani</from> </note>
XML元素中有<,>,&,'," 时用实体引用:
| < | < | less than |
| > | > | greater than |
| & | & | ampersand |
| ' | ' | apostrophe |
| " | " | quotation mark |
<message>if salary < 1000 </message>错误;
<message>if salary < 1000</message>正确。
XML中的注释:
<!-- this is a comment -->
空的XML元素:
<book></book>
<book />
matadata可以用属性来描述,data用元素来描述。
解决命名冲突:
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
<f:table>
<f:name>African Coffee Table</f:name>
<f:width>80</f:width>
<f:length>120</f:length>
</f:table>
浙公网安备 33010602011771号