What’s XML?
Extensible Markup Language, abbreviated XML, describes a class of data objects called XML documents and partially describes the behavior of computer programs which process them.
The Extensible Markup Language (XML) is a subset of SGML( [ISO 8879] ) that is completely described in this document
XML Services
SOAP: Simple Object Access Protocol
WSDL: Web Services Description Language
UDDI: Universal Description
SVG: Scalable Vector Graphics
SMIL, the Synchronized Multimedia Integration Language
XML Changes Web
XML simplifies data exchange
XML enables intelligent coding
XML lets you search smart
XML Documents Form a Tree Structure
<node >
<node_child attribute=“att_value”>
<node_subchild>Value</node_subchild> </node_child>
</node>
XML consept
Parsing
Manipulation
Validation
Web application
XML and Database
XML Parsing
The consept of Parsing to process data using programs known as parsers
These Program were able to extract and manipulate data in XML
Benefits of Parsing
Language Indipendent
Code Indipendent
Flexibility
Suitable
Type of Parsers
Event-Base
Simple API for XML (SAX)
Object-Base
Document Object Model(DOM)
JDOM
JAXP(DOM & SAX)
Parsers - DOM
Factory Instance
Syntax
DocumentBuiderFactory variable
Ex
Try{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
}catch(…){
}
Parsers – DOM[1] - Node
Node node
node.getNodeName().equals(“node_name”);
Attribute
node.getAttributes().getNamedItem(“attribute_name").getNodeValue();
Node Value
getNodeValue();