Hitachi

uCosminexus Application Server XML Processor User Guide


5.4.2 General Procedure for Creating the Sample Program

The following figure shows the general procedure for creating a sample program that uses the DOM parser.

Figure 5‒2: General procedure for creating a sample program that uses the DOM parser

[Figure]

  1. Create a Document object.

    Create a new Document object.

  2. Create the Document node.

    By using the Document object you created in step 1, create the Document node that is the parent of the DOM tree.

  3. Create the Element nodes.

    Create the necessary Element nodes from the Document node to create the DOM tree.

  4. Create the Text nodes.

    Create the character strings that are the contents of the elements.