新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论DOM, SAX, XPath等。
    [返回] 计算机科学论坛XML.ORG.CN讨论区 - XML技术『 DOM/SAX/XPath 』 → Using DOM to Traverse XML 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 4387 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: Using DOM to Traverse XML 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     skyblue523 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:12
      积分:96
      门派:XML.ORG.CN
      注册:2007/5/13

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给skyblue523发送一个短消息 把skyblue523加入好友 查看skyblue523的个人资料 搜索skyblue523在『 DOM/SAX/XPath 』的所有贴子 引用回复这个贴子 回复这个贴子 查看skyblue523的博客楼主
    发贴心情 Using DOM to Traverse XML

    Introduction
    XML is now used frequently to model business data in large-scale applications. A common Java application task is to parse XML to retrieve its data. The Document Object Model (DOM) defines a set of interfaces for navigating and manipulating the content and structure of XML and HTML documents.
    Objective
    After reading this article you will be able to create a representation of an XML document in your Java program and traverse that representation in two different ways. You will be able to traverse a horizontal representation of the XML document, and you will be able to traverse a tree, or hierarchical, representation of the XML document.
    The Document Object Model (DOM) in Detail
    The DOM defines interfaces that allow programmers to navigate XML and HTML documents and also to manipulate their content and structure. The DOM is a specification of interfaces; it's not an implementation. Vendors are left to come up with their own implementation of DOM. Sun Microsystems has some DOM support in its Java XML Processing API. Other vendors that provide support are IBM, Oracle, and the Apache Software Foundation.
    Getting Started
    This article explores the traversal of DOM representations of XML documents from within Java applications. The Apache Software Foundation has implemented the optional interfaces of the DOM Level 2 Traversal-Range Recommendation in their Xerces project. You can download the Xerces JAR, which contains the files you'll need. Xerces also supports the optional interfaces defined in DOM Level 2 Events Recommendation. Make sure to place the xerces.jar file in your system CLASSPATH so the Java compiler will be able to locate the appropriate files.

       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/5/13 12:32:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 DOM/SAX/XPath 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/7/17 13:24:34

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    39.063ms