DOM « XML « Java Articles

Home
Java Articles
1.Build Deploy
2.Class
3.Core Library
4.Data Types
5.Database JDBC
6.Design
7.Development
8.File Input Output
9.Graphics Desktop
10.J2EE Enterprise
11.J2ME Wireless
12.JVM
13.Language
14.Library Product
15.Network
16.Security
17.SOA Web Services
18.Test
19.Web Development
20.XML
Java Articles » XML » DOM 

1. Using DOM to Traverse XML    onjava.com

DOM Level 2 Traversal-Range Recommendation specifies a set of interfaces that allow programmers to traverse a representation of the XML document. There is also a set of interfaces defined to manipulate ranges of the XML document. The interfaces defined in this recommendation are optional, but if a vendor chooses to implement them, they must also implement the DOM Level 2 Core Recommendation.

2. The Good, the Bad, and the DOM    artima.com

Have an opinion about XML processing APIs? Discuss this article in the News & Ideas Forum topic, The Good, the Bad, and the DOM.

3. StAX: DOM Ease with SAX Efficiency    devx.com

Most parsers fall into two broad categories: tree based (e.g., DOM) or event based (e.g., SAX). Although StAX is more closely aligned with the latter, it bridges the gap between the two. In SAX, data is pushed via events to application code handlers. In StAX, the application "pulls" the data from the XML data stream at its convenience. Application code can filter, skip tags, or stop parsing at any time. The application--not the parser--is in control, which enables a more intuitive way to process data.

4. Mastering Ajax, Part 4: Exploiting DOM for Web response    ibm.com

To refine the terms you've learned then, a DOM tree is a tree of objects, but more specifically it is a tree of node objects. In Ajax applications -- or any other JavaScript -- you can work with those nodes to create such effects as removing an element and its content, highlighting a certain piece of text, or adding a new image element. Since this all occurs on the client side (code that runs in your Web browser), these effects take place immediately without communication with the server. The end result is often an application that feels more responsive because things on the Web page change without long pauses while a request goes to a server and a response is interpreted.

5. Understanding DOM    ibm.com

All of the examples in this tutorial are in the Java language, but you can develop a thorough understanding of the DOM through this tutorial even if you don't try out the examples yourself. The concepts and API for coding an application that manipulates XML data in the the DOM are the same for any language or platform, and no GUI programming is involved.

6. Effective XML processing with DOM and XPath in Java    ibm.com

DOM forms a very effective base on which easy-to-use systems can be built by following a few simple principles. Future versions of DOM are being designed with the combined wisdom and experience of a large group of users, and will likely present solutions to some of the problems discussed here. Projects such as JDOM are adapting the API for a more natural Java feel, and techniques such as those described in this article can help make XML manipulation easier, less verbose, and less prone to bugs. Leveraging these projects and following these usage patterns allows DOM to be an excellent platform for XML-based projects.

7. XML Matters: Beyond the DOM    ibm.com

This installment introduces a guest columnist, my friend and colleague, Dethe Elza. Dethe is well experienced in the development of Web applications that utilize XML, and I appreciate his help in covering XML programming with DOM and ECMAScript. Keep an eye on this column for future guest installments by Dethe. -David Mertz

8. XML Matters: Transcending the limits of DOM, SAX, and XSLT    ibm.com

The most common techniques for manipulating XML documents are DOM, SAX, and XSLT. These techniques have a distressing lack of unifying principles among them. Everything you might want to do with XML is available in one of the major approaches, but when what you want to do crosses the boundaries of what each technique does best, it is far from clear how to approach a problem. You are likely to wind up with a hodge-podge application in which various smaller transformations are chained together with heterogeneous techniques and tools.

9. Ajax and Java development made simpler, Part 3: Build UI features based on DOM, JavaScript, and JSP tag files    ibm.com

In this article, you learned how to build a hierarchy of client-side validators, using JavaScript constructors and prototypes. You also learned how to create server-side validators and resource-bundles based JSP tag files. Stay tuned for the next article of the series, where you'll find out how to create JSF-like components, using JSP tag files.

10. Mastering Ajax, Part 5: Manipulate the DOM    ibm.com

Understanding what a DOM tree is, and even knowing how it represents your HTML and CSS, is just the first step in taking control of your Web pages. Next, you need to learn how to work with the DOM tree for a particular Web page. For instance, if you add an element to the DOM tree, that element immediately appears in a user's Web browser -- without the page reloading. Remove some text from the DOM tree, and that text vanishes from the user's screen. You can change and interact with the user interface through the DOM, which gives you tremendous programming power and flexibility. Once you learn how to work with a DOM tree you've taken a huge leap toward mastering rich, interactive, dynamic Web sites.

11. Tip: Converting from DOM    ibm.com

For those of you who are sold on the W3C's DOM (the Document Object Model) and think SAX is silly, you will have to find a way to move from DOM to the other formats that application developers use. These other formats are, of course, SAX and JDOM. What do you do when you have to accept DOM as input and convert it to something else? This certainly is a valid question. With DOM providing a complete document representation, converting it into another format makes a lot of sense. In this tip, you'll learn how to perform this conversion from DOM to either SAX or JDOM

12. Create rich client apps with the DOM    ibm.com

Yes, developers can start to have their cake and eat it too, as the chains of the standard Web application -- a thin client working in conjunction with a server -- continue to break. Today you can create applications with rich interactive functionality that are easily deployed and upgraded on the Web. This is a result of the development, acceptance, and adherence to standards regarding the Document Object Model (DOM). UI designers and developers can leverage the DOM's accessibility and manipulability through JavaScript and cascading style sheets (CSS) to create systems that users can manage more efficiently.

13. Using the DOM class in AJAX with the GWT and Java    developer.com

For example, in the previous lesson entitled "Focus events, click events, and Drag-and Drop in AJAX using the GWT and Java" (see Resources), it was necessary to invoke the setCapture method of the DOM class to make certain that the mouse would not lose the button as the button slid underneath another component while the button was being dragged. I don't know of any way to accomplish that in the GWT without using a method of the DOM class.

14. Java JAXP, Exposing a DOM Tree    developer.com

A DOM parser can be used to create a tree structure in memory that represents an XML document. In Java, that tree structure is encapsulated in an object of the interface type Document. Document and its superinterface Node declare numerous methods that may be used to navigate, extract information from, modify, and otherwise manipulate the DOM tree. As is always the case, classes that implement Document must provide concrete definitions of those methods.

15. An Improved Approach for Creating SVG/XML Code and SVG/XML DOM Nodes using Java    developer.com

In the previous lesson titled "Java JAXP, Creating graphics using Java and SVG" (see Resources) I taught you how write your own SVG graphics library to eliminate, or at least alleviate the requirement to write raw XML code or raw JAXP DOM code, making it possible for you to produce SVG output simply by making typical Java method calls.

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.