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
  • 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

    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

    After becoming familiar with these structure types we had to apply them by creating a java program and I tell you … that was interesting. I think I did a good job but I will know for certain next week, till then fingers cross.…

    • 605 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    What Is Xml

    • 488 Words
    • 2 Pages

    XML, or Extensible Markup Language, is an internet language used to represent text and data that can be used without much human or machine intelligence. XML is a lot like HTML except for two major differences. The first is separation of form and content. HTML mostly consists of tags defining the appearance of text. In XML the tags generally define the structure and content of the data, with actual appearance specified by a specific application or an associated stylesheet. The second is XML is extensible. Tags can be defined by individuals or organizations for some specific application, whereas the HTML standard tagset is defined by the World Wide Web Consortium.…

    • 488 Words
    • 2 Pages
    Satisfactory 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

    It is useful to the business organizations because it is capable of creating high-quality documents, work with enhanced reliability and security features, find commands and help with ease and organizes your time and communications. It can connect your documents to business information. Create dynamic Smart Documents that update themselves by connecting to your back-end systems using new document controls and data bindings. By using the new XML integration capability, organizations can deploy intelligent templates to assist in creating highly structured documents. This software facilitates both the needs of the internal and external users. Its limitations are that the suite is only backward compatible and some spelling errors occur if the English language is not specifically chosen for a particular country.…

    • 1694 Words
    • 6 Pages
    Powerful 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
  • Satisfactory Essays

    For Getting The Root Element Node ... root_element = xmlDocGetRootElement(doc); print_element_names(root_element); printf("The Total Number Of Nodes In The Tree : %d \n",no_of_nodes); fprintf(fp,"\n"); tree_pattern = (struct MyNode **)malloc(no_of_nodes*sizeof(struct MyNode *)); pos = (int *)malloc(no_of_nodes*sizeof(int)); no_of_nodes = 0; root_element1 = xmlDocGetRootElement(doc1); print_element_names(root_element1); printf("The Total Number Of Nodes In The SubTree : %d\n",no_of_nodes); int n = no_of_nodes; subtree_pattern = (struct…

    • 488 Words
    • 2 Pages
    Satisfactory 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

    History of File Structure

    • 322 Words
    • 2 Pages

    • In 1963, researchers came up with the idea of AVL trees for data in memory.…

    • 322 Words
    • 2 Pages
    Satisfactory Essays

Related Topics