•XML stands for EXtensible Markup Language•XML is a markup language much like HTML•XML was designed to carry data, not to ...
There are two current versions of XML. The first XML 1.0 was initially defined in1998 and it has undergone minor changes/r...
.                                          Mobile Application                     Web Services                 Windows App...
Domain-specific vocabulary                 Data interchange                 Smart searches                 Granular update...
The various components of an XML          document used for representing data in a          hierarchical order are:       ...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                              Processing Instruction (PI...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                 <!--STOREDATA is the root element-->   ...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                                                        ...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                 <!--STOREDATA is the root element-->   ...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                 <!--STOREDATA is the root element-->   ...
Components of an XML Document (Contd.)                 <?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA> ...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                 <!--STOREDATA is the root element-->   ...
<?xml version=“1.0” encoding=“UTF-8”?>                 <STOREDATA>                 <!--STOREDATA is the root element-->   ...
Every start tag must have an end tag.             Empty tags must be closed using a forward             slash (/).        ...
Element declaration      Syntax                 <!ELEMENT element-name (element-content)>      Example                 <!E...
Attribute Declaration       Syntax       <!ATTLIST element-name attribute-name attribute-type default-value>       Example...
<?xml version="1.0"?>     <!DOCTYPE note [     <!ELEMENT note (to,from,heading,body)>     <!ELEMENT to (#PCDATA)>     <!EL...
Note.dtd    <!ELEMENT note (to,from,heading,body)>    <!ELEMENT to (#PCDATA)>    <!ELEMENT from (#PCDATA)>    <!ELEMENT he...
An XML schema defines the list of                 elements and attributes that can be                 used in an XML docum...
Some of the advantages of creating an XML         schema by using XSD are:             XSD provides control over the type ...
Data Types in XML Schemas (Contd.)                 In an XML schema created using                 XSD, every element must ...
A Boolean true or false value. Representations of true are "true" and "1"; false                      is denoted as "false...
1. Complex Type : A data type which contains other elements.2. Simple Type : A data type which contains one formatted elem...
A CSS is a text file containing one or                 more rules or definitions for the style                 characteris...
A CSS can be applied to an XML                 document using the following                 syntax:                       ...
Introducing XSL                 CSS does not support the reorder, sort, and display of                 elements based on a...
The XSLT processor applies the                 transformation information to the                 source document and build...
XSLT provides the following          elements to select and format data:             stylesheet             value-of      ...
XSLT provides the following                 elements to select and format data:                 c stylesheet     Instructs...
XSLT provides the following                 elements to select and format data:                                  Displays ...
XSLT provides the following                 elements to select and format data:                 c stylesheet Instructs the...
XSLT provides the following                 elements to select and format data:                 c stylesheet              ...
XSLT provides the following                 elements to select and format data:                 c stylesheet              ...
Used with the if and choose elements to narrow down                   the formatting criteria.                 r The follo...
Operator/Special   Example               DescriptionCharacter@                  @PRODUCTID            Used as a prefix for...
DOM defines the logical structure of documents.                 DOM provides an Application Programming Interface         ...
MSXML parser:                   Is the Microsoft implementation of DOM.                   Provides fundamental as well as ...
Following are the key DOM objects:                  Document                  Element                  Node               ...
Following are the the top-level object thatobjects:                                 •It is                                ...
Following are the key DOM objects:                 e Document       •It represents all the element nodes in an XML        ...
Following are the key DOM objects:                 e Document                                It represents a single node i...
Following are the key DOM objects:                 e Document                 e Element       It provides a list of nodes...
Following are the key DOM objects:                 e Document                 e Element                 e Node            ...
Following are the key DOM objects:                 e Document                 e Element                 e Node            ...
XML DOM Objects in Scripts                 The DOM objects can be used within                 scripting languages such as ...
Xml
Xml
Xml
Xml
Xml
Xml
Upcoming SlideShare
Loading in …5
×

Xml

2,257 views

Published on

Complete XML tutorial PPT

Published in: Technology, News & Politics
1 Comment
1 Like
Statistics
Notes
  • it's not very clearly !
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
2,257
On SlideShare
0
From Embeds
0
Number of Embeds
248
Actions
Shares
0
Downloads
230
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • While explaining the definition of system forensics, ask the students to note the following key words in the definition: Identify Extract Process Analyze Digital and hardware evidence Tell the students that these form an integral aspect of system forensics and would be discussed in detail. Before moving on to the next slide, hold a brief discussion on why is it important for organizations to take the help of system forensics. The discussion should be focused on: The role that system forensics plays in organizations having an IT set up. This discussion will serve as a precursor to the next slide.
  • While explaining the definition of system forensics, ask the students to note the following key words in the definition: Identify Extract Process Analyze Digital and hardware evidence Tell the students that these form an integral aspect of system forensics and would be discussed in detail. Before moving on to the next slide, hold a brief discussion on why is it important for organizations to take the help of system forensics. The discussion should be focused on: The role that system forensics plays in organizations having an IT set up. This discussion will serve as a precursor to the next slide.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
  • Introduce the students to the different types of threats that systems face by: Asking the students to give examples of what they think are environmental and human threats. Asking the students to give instances of what they think are malicious and non-malicious threats. Conclude the discussion on the different types of threats by giving additional examples of malicious and non malicious threats.
  • Introduce the students to the different types of threats that systems face by: Asking the students to give examples of what they think are environmental and human threats. Asking the students to give instances of what they think are malicious and non-malicious threats. Conclude the discussion on the different types of threats by giving additional examples of malicious and non malicious threats.
  • While explaining the definition of system forensics, ask the students to note the following key words in the definition: Identify Extract Process Analyze Digital and hardware evidence Tell the students that these form an integral aspect of system forensics and would be discussed in detail. Before moving on to the next slide, hold a brief discussion on why is it important for organizations to take the help of system forensics. The discussion should be focused on: The role that system forensics plays in organizations having an IT set up. This discussion will serve as a precursor to the next slide.
  • Introduce the students to the different types of threats that systems face by: Asking the students to give examples of what they think are environmental and human threats. Asking the students to give instances of what they think are malicious and non-malicious threats. Conclude the discussion on the different types of threats by giving additional examples of malicious and non malicious threats.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • While explaining the definition of system forensics, ask the students to note the following key words in the definition: Identify Extract Process Analyze Digital and hardware evidence Tell the students that these form an integral aspect of system forensics and would be discussed in detail. Before moving on to the next slide, hold a brief discussion on why is it important for organizations to take the help of system forensics. The discussion should be focused on: The role that system forensics plays in organizations having an IT set up. This discussion will serve as a precursor to the next slide.
  • Elaborate on the role that system forensics plays in an organization, based on the discussion in the previous slide and the information given on this slide.
  • Connect the information given on this slide to the initial discussion held on the different types of system-related crimes.
  • Connect the information given on this slide to the initial discussion held on the different types of system-related crimes.
  • Connect the information given on this slide to the initial discussion held on the different types of system-related crimes.
  • Connect the information given on this slide to the initial discussion held on the different types of system-related crimes.
  • Connect the information given on this slide to the initial discussion held on the different types of system-related crimes.
  • Connect the information given on this slide to the initial discussion held on the different types of system-related crimes.
  • While explaining the definition of system forensics, ask the students to note the following key words in the definition: Identify Extract Process Analyze Digital and hardware evidence Tell the students that these form an integral aspect of system forensics and would be discussed in detail. Before moving on to the next slide, hold a brief discussion on why is it important for organizations to take the help of system forensics. The discussion should be focused on: The role that system forensics plays in organizations having an IT set up. This discussion will serve as a precursor to the next slide.
  • Introduce the students to the different types of threats that systems face by: Asking the students to give examples of what they think are environmental and human threats. Asking the students to give instances of what they think are malicious and non-malicious threats. Conclude the discussion on the different types of threats by giving additional examples of malicious and non malicious threats.
  • Introduce the students to the different types of threats that systems face by: Asking the students to give examples of what they think are environmental and human threats. Asking the students to give instances of what they think are malicious and non-malicious threats. Conclude the discussion on the different types of threats by giving additional examples of malicious and non malicious threats.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Hold a two- three minute discussion on the different types of system-related crimes that the students have experienced or heard. At the end of the discussion, give additional examples of system-related crimes.
  • Elaborate on the role that system forensics plays in an organization, based on the discussion in the previous slide and the information given on this slide.
  • Xml

    1. 1. •XML stands for EXtensible Markup Language•XML is a markup language much like HTML•XML was designed to carry data, not to display data•XML tags are not predefined. You must define your own tags•XML is designed to be self-descriptive•XML is a W3C Recommendation
    2. 2. There are two current versions of XML. The first XML 1.0 was initially defined in1998 and it has undergone minor changes/revisions since then. Though changeshave been done, a new revision number has not been assigned to this version. It iscalled XML 1.0 5th edition, with the latest edition (5th) being released on 26th Nov2008.The second version XML 1.1 was initially published on 4th Feb 2004, the same dayas the XML 1.0, 3rd edition. XML 1.1 is currently in its 2nd edition which wasreleased on 16th Aug 2006. It contains certain features that are expected to makeXML easier to use.
    3. 3. . Mobile Application Web Services Windows Application Web Application XML DB2 Oracle SQL Server Access Data SourcesAshok K Sharma 04/05/12 4
    4. 4. Domain-specific vocabulary Data interchange Smart searches Granular updates User-selected view of data Message transformationAshok K Sharma 04/05/12 5
    5. 5. The various components of an XML document used for representing data in a hierarchical order are: Processing Instruction (PI) Tags Elements Content Attributes Entities CommentsAshok K Sharma 04/05/12 6
    6. 6. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> Processing Instruction (PI) <!--STOREDATA is the root element--> Provides information on how <STORE STOREID=“S101”> the XML file should be <PRODUCTNAME>Toys</PRODUCTNAME> processed. <QUANTITY>100</QUANTITY> <DISPLAY>The price of this toy is &lt; 200 </DISPLAY> </STORE> </STOREDATA>Ashok K Sharma 04/05/12 7
    7. 7. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> <!--STOREDATA is the root element--> Tags <STORE STOREID=“S101”> Is a means of identifying <PRODUCTNAME>Toys</PRODUCTNAME> data. Tags consist of start tag and end tag. <QUANTITY>100</QUANTITY> <DISPLAY>The price of this toy is &lt; 200 </DISPLAY> </STORE> </STOREDATA>Ashok K Sharma 04/05/12 8
    8. 8. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> Root Element <!--STOREDATA is the root element--> <STORE STOREID=“S101”> Contains all other elements <PRODUCTNAME>Toys</PRODUCTNAME> in the document. <QUANTITY>100</QUANTITY> <DISPLAY>The price of this toy is &lt; 200 </DISPLAY> </STORE> </STOREDATA>Ashok K Sharma 04/05/12 9
    9. 9. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> <!--STOREDATA is the root element--> Comments <STORE STOREID=“S101”> <PRODUCTNAME>Toys</PRODUCTNAME> Are statements used to explain the XML code. <QUANTITY>100</QUANTITY> <DISPLAY>The price of this toy is &lt; 200 </DISPLAY> </STORE> </STOREDATA>Ashok K Sharma 04/05/12 10
    10. 10. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> <!--STOREDATA is the root element--> <STORE STOREID=“S101”> Child Elements <PRODUCTNAME>Toys</PRODUCTNAME> Are the basic units used to <QUANTITY>100</QUANTITY> identify and describe data in XML. <DISPLAY>The price of this toy is &lt; 200 </DISPLAY> </STORE> </STOREDATA>Ashok K Sharma 04/05/12 11
    11. 11. Components of an XML Document (Contd.) <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> <!--STOREDATA is the root element--> <STORE STOREID=“S101”> <PRODUCTNAME>Toys</PRODUCTNAME> Attributes Provide additional <QUANTITY>100</QUANTITY> information about the <DISPLAY>The price of this toy elements for which they are declared. is &lt; 200 </DISPLAY> </STORE> </STOREDATA>Ashok K Sharma 04/05/12 12
    12. 12. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> <!--STOREDATA is the root element--> <STORE STOREID=“S101”> <PRODUCTNAME>Toys</PRODUCTNAME> Content <QUANTITY>100</QUANTITY> Refers to the information represented by the elements <DISPLAY>The price of this toy of an XML document. An is &lt; 200 </DISPLAY> element can contain: </STORE> • Character or data content </STOREDATA> • Element content • Combination or mixed contentAshok K Sharma 04/05/12 13
    13. 13. <?xml version=“1.0” encoding=“UTF-8”?> <STOREDATA> <!--STOREDATA is the root element--> <STORE STOREID=“S101”> <PRODUCTNAME>Toys</PRODUCTNAME> <QUANTITY>100</QUANTITY> Entities <DISPLAY>The price of this toy Is a set of information that is &lt; 200 </DISPLAY> can be used by specifying a </STORE> single name. </STOREDATA>Ashok K Sharma 04/05/12 14
    14. 14. Every start tag must have an end tag. Empty tags must be closed using a forward slash (/). All attribute values must be given in double quotation marks. Tags must have proper nesting. XML tags are case sensitive.Ashok K Sharma 04/05/12 15
    15. 15. Element declaration Syntax <!ELEMENT element-name (element-content)> Example <!ELEMENT employee(#PCDATA)> Any Element content <!ELEMENT employee ANY> Other Child Element as Content <!ELEMENT employee (name,phone,age,dept)> At least One occurrence of child element <!ELEMENT employee (name,contact+)> Zero or more occurrence of element <!ELEMENT employee(name,phone,email*)>Ashok K Sharma 04/05/12 17
    16. 16. Attribute Declaration Syntax <!ATTLIST element-name attribute-name attribute-type default-value> Example <!ATTLIST payment type CDATA "check"> Entities Entity References Character &lt; < &gt; > &amp; & &quot; " &apos; Ashok K Sharma 04/05/12 18
    17. 17. <?xml version="1.0"?> <!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Dont forget me this weekend</body> </note> http://www.xmlvalidation.com/Ashok K Sharma 04/05/12 19
    18. 18. Note.dtd <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> Referring DTD from XML <!DOCTYPE root-element SYSTEM "filename"> Note.xml <?xml version="1.0"?> <!DOCTYPE note SYSTEM "note.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Dont forget me this weekend! </body> </note>Ashok K Sharma 04/05/12 20
    19. 19. An XML schema defines the list of elements and attributes that can be used in an XML document. An XML schema specifies the order in which the elements appear in the XML document, and their data types. Microsoft has developed the XML Schema Definition (XSD) language to define the schema of an XML document.Ashok K Sharma 04/05/12 22
    20. 20. Some of the advantages of creating an XML schema by using XSD are: XSD provides control over the type of data that can be assigned to elements and attributes. XSD enables you to create your own data types. XSD enables you to specify restrictions on data. The syntax for defining an XSD is the same as the syntax used for XML documents. XML schema content models can be used to validate mixed content. XML schema is extensible. XML schema is self documenting.Ashok K Sharma 04/05/12 23
    21. 21. Data Types in XML Schemas (Contd.) In an XML schema created using XSD, every element must be associated with a data type. XSD Data Types Primitive User Defined Simple Type Complex TypeAshok K Sharma 04/05/12 24
    22. 22. A Boolean true or false value. Representations of true are "true" and "1"; false is denoted as "false" or "0".booleanbyte A signed 8-bit integer in the range [-128, 127].date Represents a specific date Represents a specific instant of time. It has the form YYYY-MM-DDThh:mm:ssdateTime folowed by an optional time-zone suffixdecimal Any base-10 fixed-point number.double A 64-bit floating-point decimal numberfloat A 32-bit floating-point decimal numberint Represents a 32-bit signed integer in the range [-2,147,483,648, 2,147,483,647].integer Represents a signed integerlanguage One of the standardized language codeslong A signed, extended-precision integer; at least 18 digits are guaranteednegativeInteger Represents an integer less than zerononNegativeInteger An integer greater than or equal to zerononPositiveInteger An integer less than or equal to zero.positiveInteger An extended-precision integer greater than zerostring Any sequence of zero or more characters.
    23. 23. 1. Complex Type : A data type which contains other elements.2. Simple Type : A data type which contains one formatted element.
    24. 24. A CSS is a text file containing one or more rules or definitions for the style characteristics of a particular element. It controls how tags are formatted in XML and HTML documents. The CSS file can be included in XML documents with the same data structure.Ashok K Sharma 04/05/12 28
    25. 25. A CSS can be applied to an XML document using the following syntax: Specifies the type of <?xml:stylesheet type="text/css" formatting that is being used. href="path-name"?>Ashok K Sharma 04/05/12 29
    26. 26. Introducing XSL CSS does not support the reorder, sort, and display of elements based on a condition. For such advanced formatting, XML supports Extensible Style Sheet Language (XSL). XSL has two parts: XSL Transformations (XSLT) XML Path (XPath) XSL: Contains instructions on how an XML document should be transformed into an HTML or an XHTML document. Uses XPath expressions to extract specific data from an XML document. The XSLT processor transforms the XML document into an HTML or XHTML or into another XML document.Ashok K Sharma 04/05/12 30
    27. 27. The XSLT processor applies the transformation information to the source document and builds the result tree as shown in the following figure. MSXML Parser XSLT style sheet XSLT tree XSLT Result tree processor XML document Source treeAshok K Sharma 04/05/12 31
    28. 28. XSLT provides the following elements to select and format data: stylesheet value-of for-each sort textAshok K Sharma 04/05/12 32
    29. 29. XSLT provides the following elements to select and format data: c stylesheet Instructs the browser that the document is a style sheet file. g value-of Is the root element for all XSLT style sheets. Is written as: g for-each <xsl:stylesheet xmlns:xsl= g sort "http://www.w3.org/1999/XSL/Transform" version="1.0"> g textAshok K Sharma 04/05/12 33
    30. 30. XSLT provides the following elements to select and format data: Displays the value of the specified element or c stylesheet attribute. Follows the syntax: g value-of <xsl:value‑of select="elementname/attributename"/> g for-each g sort g textAshok K Sharma 04/05/12 34
    31. 31. XSLT provides the following elements to select and format data: c stylesheet Instructs the XSLT processor to process the information for each instance of the specified pattern. g value-of Follows the syntax: <xsl:for-each select="pattern"> g for-each [action to be performed] </xsl:for-each> g sort g textAshok K Sharma 04/05/12 35
    32. 32. XSLT provides the following elements to select and format data: c stylesheet g value-of Sorts data based on the values assigned to elements and g for-each attributes. Follows the syntax: <xsl:sort select="expression" g sort order="ascending | descending" case-order="upper-first | lower-first“ g text data-type="text | number | qname"/>Ashok K Sharma 04/05/12 36
    33. 33. XSLT provides the following elements to select and format data: c stylesheet g value-of Generates constant text in the output and displays g for-each labels. Follows the syntax: g sort <xsl:text> Text to be displayed as label </xsl:text> g textAshok K Sharma 04/05/12 37
    34. 34. Used with the if and choose elements to narrow down the formatting criteria. r The following table lists various comparison and Boolean operators. Operator Meaning Example PRICE[. = 20] = Equal to PRODUCTNAME[. = ‘Mini Bus’] PRICE[. != 20] != Not equal to PRODUCTNAME[. != ‘Barbie Doll’] &lt; Less than PRICE[. &lt; 20] &gt; Greater than PRICE[. &gt; 20] &lt;= Less than or equal to PRICE[. &lt;= 20] &gt;= Greater than or equal to PRICE[. &gt;= 20] and Logical AND PRICE[. &gt 20 and . &lt; 30] or Logical OR PRICE[. = 20 or . = 45] not Negation operator PRICE[not(. = 30)]Ashok K Sharma 04/05/12 38
    35. 35. Operator/Special Example DescriptionCharacter@ @PRODUCTID Used as a prefix for the attribute.@* @* Selects all attributes.: : Separates the namespace prefix from the element or attribute name.( ) (PRICE*QUANTITY) Used to group operations.[ ] [@PRODUCTID=P001] Applies a filter pattern.+ num1 + num2 Returns the sum of two numbers.- num1 - num2 Returns the difference of two numbers.* num1 * num2 Returns the product of two numbers.div num1 div num2 Returns the quotient of two numbers.mod num1 mod num2 Returns the modulus, that is, the remainder of integer division.
    36. 36. DOM defines the logical structure of documents. DOM provides an Application Programming Interface (API) for dynamically accessing and manipulating a document. The DOM objects have associated methods and properties to access and manipulate a document. A DOM-enabled parser is required to use the features provided by DOM. A DOM-enabled parser: Parses an XML document to ascertain its validity. Creates an in‑memory representation of the XML document as a tree structure.Ashok K Sharma 04/05/12 41
    37. 37. MSXML parser: Is the Microsoft implementation of DOM. Provides fundamental as well as added interfaces to access documents. The following figure represents how a DOM tree is used by applications to access data. MSXML Library XML DOM Tree Document Parser Root Application Parsed Child Document Text Child TextAshok K Sharma 04/05/12 42
    38. 38. Following are the key DOM objects: Document Element Node NodeList Attr Text ParseErrorAshok K Sharma 04/05/12 43
    39. 39. Following are the the top-level object thatobjects: •It is key DOM implements all the basic DOM methods. e Document •It also has methods that support XSLT. •It has methods that can be used to navigate, e Element query, and modify the content and structure of an XML document. •Some of the methods provided by this object e Node are createElement(), createAttribute(), createComment() , and createTextNode(). e NodeList •Some of the properties provided by this object that help in manipulating the information contained in e Attr the object are async, childNodes, firstChild, documentElement, xml, and readyState. e Text e ParseErrorAshok K Sharma 04/05/12 44
    40. 40. Following are the key DOM objects: e Document •It represents all the element nodes in an XML document. e Element •The attributes associated with the elements are considered to be the properties of the elements e Node rather than their child elements. •Some of the methods of this object are e NodeList also inherited from the Node object. •Some of the methods provided by this object are e Attr getAttribute(), getElementsByTagName(), e Text normalize(), and removeAttributeNS(). e ParseErrorAshok K Sharma 04/05/12 45
    41. 41. Following are the key DOM objects: e Document It represents a single node in the XML document e Element tree structure. It provides methods to work with child elements. e Node Some of the methods of this object are appendChild(newChild), insertBefore(newNode,refNode), e NodeList and removeChild(nodeName). e Attr e Text e ParseErrorAshok K Sharma 04/05/12 46
    42. 42. Following are the key DOM objects: e Document e Element  It provides a list of nodes present in an XML document for manipulation. e Node  This object enables you to iterate through a collection of nodes. e NodeList  Some of the method of this object are item() and nextNode(). e Attr e Text e ParseErrorAshok K Sharma 04/05/12 47
    43. 43. Following are the key DOM objects: e Document e Element e Node It represents an attribute of the Element object. It is also a Node and inherits various e NodeList attributes and methods of Node object. e Attr An attribute is not considered by the DOM to be e Text a child node of an element, but rather a property. e ParseErrorAshok K Sharma 04/05/12 48
    44. 44. Following are the key DOM objects: e Document e Element e Node It represents the text inside an XML element in e NodeList the node tree. The splitText() method is associated e Attr with this object. e Text e ParseErrorAshok K Sharma 04/05/12 49
    45. 45. XML DOM Objects in Scripts The DOM objects can be used within scripting languages such as JavaScript and VBScript. Using DOM objects in scripts allow dynamically applying a style sheet to an XML document. The code for using DOM objects for accessing an XML document needs to be used as an HTML page.Ashok K Sharma 04/05/12 50

    ×