选择显示字体大小

亲密接触xml(5)---xml元素

     xml元素
  xml元素是可扩展的,彼此之间有关联。 xml元素的命名规则很简单。
  
     xml元素是可扩展的
  
     xml文档可以进行扩展以携带更多的信息。 请看下面的xml note 例子:
  
     < note>
     < to>tove< /to>
     < from>jani< /from>
     < body>don't forget me this weekend!< /body>
     < /note>
  
     想象一下,我们创建了一个应用程序,它把 < to>、< from>和< body>元素从 xml 文档中提取出来,生成了这样的输出:
  
     message
  
     to: tove
     from: jani
  
     don't forget me this weekend!
  
     假如这个xml文档的作者又向其中增加了一些额外信息:
  
     < note>
     < date>1999-08-01< /date>
     < to>tove< /to>
     < from>jani< /from>
     < heading>reminder< /heading>
     < body>don't forget me this weekend!< /body>
     < /note>
  
     那么这个应用程序会不会出故障呢? 不会的,应用程序还是会从xml文档中找到< to>、< from>和< body> 元素而生成同样的输出。 xml文档是可以扩展的。
  
     xml元素是彼此关联的
  
     它们之间的关系就象父母与孩子之间的关系一样。要理解xml的术语,你就必须知道xml元素的命名和xml元素的描述之间的关系。 下面是一本书的描述:
  
     book title: my first xml
  
  chapter 1: introduction to xml
  
  what is html
  what is xml
  chapter 2: xml syntax
  
  elements must have a closing tag
  elements must be correctly nested
  
  
     下面的xml 文档对这本书进行描述:
  
     < book>
     < title>my first xml< /title>
     < prod id="33-657" media="paper">< /prod>
     < chapter>introduction to xml
     < para>what is html< /para>
     < para>what is xml< /para>
     < /chapter>
  
     < chapter>xml syntax
     < para>elements must have a closing tag< /para>
     < para>elements must be properly nested< /para>
     < /chapter>
  
     < /book>
  
     在这里,book(书)是根元素,title 和 chapter(标题和章)是 book的子元素。 book 是title和chapter 的母元素。 title 和 chapter 则是兄弟元素 (或姐妹元素),因为它们的父母相同。
  
  
    


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons