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元素中有<,>,&,'," 时用实体引用:

&lt;<less than
&gt;>greater than
&amp;&ampersand
&apos;'apostrophe
&quot;"quotation mark
如:

<message>if salary < 1000 </message>
错误;

<message>if salary &lt; 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>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值