Preview

about dom in xml

Powerful Essays
Open Document
Open Document
2907 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
about dom in xml
Document Object Model
Objectives
To understand what the Document Object Model is
To understand and be able to use the major DOM features
To use JavaScript to manipulate an XML document
To use Java to manipulate an XML document
To become familiar with DOM-based parsers

Introduction
DOMs are to manipulate the contents of an XML document.
XML documents, when parsed, are represented as a hierarchical tree structure in memory. This tree structure contains the document's elements, attributes, content, etc. XML was designed to be a live, dynamic technology - a programmer can modify the contents of the tree structure, which essentially allows the programmer to add data, remove data, query for data, etc. in a manner similar to a database. The W3C provides a standard recommendation for building a tree structure in memory for XML documents called the XML Document Object Model (DOM). Any parser that adheres to this recommendation is called a DOM-based parser. Each element, attribute, CDATA section, etc., in an XML document is represented by a node in the DOM tree. For example, the simple XML document Hi, Tem!

results in a DOM tree with several nodes. One node is created for the message element. This node has a child node that corresponds to the body element. The body element also has a child node that corresponds to the text Hi, Tem!. The from and to attributes of the message element also have corresponding nodes in the DOM tree.
A DOM-based parser exposes (i.e., makes available) a programmatic library - called the DOM
Application Programming Interface (API) - that allows data in an XML document to be accessed and modified by manipulating the nodes in a DOM tree.

Portability:
The DOM interfaces for creating and manipulating XML documents are platform and language independent. DOM parsers exist for many different languages, including Java,
C, C+ +, Python and Perl.
Another API - JDOM-provides a higher-level API than the W3C DOM for

You May Also Find These Documents Helpful

  • Satisfactory Essays

    The plant method design pattern generates a group of connected items instantiated by subclasses (University of Phoenix, 2005). This design pattern generates items without indicating the category of item that's to be generated. The plant method pattern describes a different way of producing items by using subclasses to override the derived kind of item that's to be generated.…

    • 579 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Cse 373 Final Note

    • 955 Words
    • 4 Pages

    An ordered or sorted binary tree, is a node based binary tree data structure that has the following properties:…

    • 955 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Nt1310 Final Exam

    • 746 Words
    • 3 Pages

    A __________ is a rule that defines the appearance of an element on a Web page.…

    • 746 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    DOM Level 3, the current release of the DOM specification, published in April 2004, added support for XPath and keyboard event handling, as well as an interface for serializing documents as XML. Since the beginning of 2004 there are also W3C DOM Level 3 recommendations for Core, Load and Save, and Validation where Level 3 Core again improves and refines Level 2 Core while the other two modules add new features.…

    • 559 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    HTML is currently in its fifth revision or HTML53. With HTML5 a standard is set for how to display the web page; where pictures are displayed, fonts used for text and total layout of the page. XML (extensible markup language) is used for web documents. CCS (cascading style sheet) is written into the HTML document or attached as a file to define the appearance of the displayed page.…

    • 897 Words
    • 4 Pages
    Good Essays
  • Good Essays

    In a procedural program, modules interact by reading and writing state that is stored in shared data structures.…

    • 793 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    14. This XHTML element is used to indent and separate an area of text. It was originally intended for use with quotations: blockquote…

    • 335 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    There are many elements classified under the term formal elements, those being: lines, shape and volume, texture and pattern, light and value, color, space,…

    • 1103 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Cen 254 Data Structure

    • 924 Words
    • 4 Pages

    keys 30, 40, 24, 58, 48, 26, 11, 13 (in this order). Draw the tree after each…

    • 924 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    WML scripting language is used to design applications that are sent over wireless devices such as mobile phones. This language takes care of the small screen and the low bandwidth of transmission. WML is an application of XML, which is defined in a document-type definition. WML pages are called decks. They are constructed as a set of cards, related to each other with links. When a WML page is accessed from a mobile phone, all the cards in the page are downloaded from the WAP server to mobile phone showing the content. WML commands and syntaxes are used to show content and to navigate between the cards. Developers can use these commands to declare variables, format text, and show images on the mobile phone.…

    • 1100 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    – Hierarchical - Users navigate along the branches of a tree structure that is shaped by the natural logic of the content. It is also called linear with branching.…

    • 1792 Words
    • 8 Pages
    Powerful Essays
  • Powerful Essays

    There are four required steps/procedures to be taken before the “tree” can work as an efficient representation of a certain data structure:…

    • 2024 Words
    • 9 Pages
    Powerful Essays
  • Powerful Essays

    Data Structure Reviewer

    • 5336 Words
    • 22 Pages

    In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. Different kinds of data structures are suited to different kinds of applications and some are highly specialized to certain tasks. For example, B-trees are particularly well-suited for implementation of databases, while compiler implementations usually use hash tables to look up identifiers. Data structures are used in almost every program or software system. Specific data structures are essential ingredients of many efficient algorithms and make possible the management of huge amounts of data, such as large databases and internet indexing services. Some formal design methods and programming languages emphasize data structures, rather than algorithms, as the key organizing factor in software design.…

    • 5336 Words
    • 22 Pages
    Powerful Essays
  • Satisfactory Essays

    const char *pattern = "/home/naveen/Desktop/SubTrees_in_Tree/Programs/pattern.xml"; const char *subpattern = "/home/naveen/Desktop/SubTrees_in_Tree/Programs/subpattern.xml"; doc = xmlReadFile(pattern, NULL, 0); doc1 = xmlReadFile(subpattern, NULL, 0); if (doc == NULL || doc1 = = NULL) printf("error: could not parse file %s or %s.\n", pattern,subpattern); else { fp = fopen("input_file.txt","w"); //…

    • 488 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    History of File Structure

    • 322 Words
    • 2 Pages

    • Where N is the number of entries in the file and k is the number of entries indexed in a single block of the B-Tree structure…

    • 322 Words
    • 2 Pages
    Satisfactory Essays

Related Topics