// —————————————————————————– // SAXExample.java // —————————————————————————– // imports import java.io.*; import java.net.URL; import org.xml.sax.*; import org.xml.sax.helpers.DefaultHandler; import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; /** * —————————————————————————– * Demonstrate how to use SAX. * * @version 1.0 * @author Muhammad Abid (abidshafiq479@hotmail.com) * @author http://www.techstop.abidshafiq.com * —————————————————————————– */ public class SAXExample extends HandlerBase{ // Store the locator [...]
Archive for the ‘XML’ Category
SOAP- Simple Object Access Protocol
What is SOAP? SOAP stands for Simple Object Access Protocol SOAP is a communication protocol SOAP is for communication between applications SOAP is a format for sending messages SOAP communicates via Internet SOAP is platform independent SOAP is language independent SOAP is based on XML SOAP is simple and extensible SOAP allows you to get [...]
Java XML API comparison
Feature StAX SAX DOM TrAX API Type Pull, streaming Push, streaming In memory tree XSLT Rule Ease of Use High Medium High Medium XPath Capability Not supported Not supported Supported Supported CPU and Memory Efficiency Good Good Varies Varies Forward Only Supported Supported Not supported Not supported Read XML Supported Supported Supported Supported Write XML [...]
XML Schema Design Pattern Introduction
Here we shall define the four most used design patterns regarding XML schema, which are Russian Doll, Salami Slice, Venetian Blind, and Garden of Eden. These patterns can be distinguished by two easy conventions, Ease of use for instance developers Ease of reuse for schema developers
XML Schema
XML structures schema define a class of documents by using schema components to constrain and provide meaning to the documents, usage and relationship among their parts, like, data types, elements and attributes in addition with values. It provides the schema for specification for further information of document. Thus formally can be said that,
“XML Schema: Structures can be used to define, describe and catalogue XML vocabularies for classes of XML documents.”
XML Namespace
To avoid the conflict in xml schema namespace is the solution.
It provides the way to define a unique identifier in a schema context. In an XML schema, you can create elements and types, which are named distinctively within the namespace of the schema. An element is the namespace’s definition scope, which can override a namespace declaration defined in a parent element. Given that a namespace defines a context in which identifiers must be unique, schemas can safely integrate definitions from other namespaces—even those with the same names
What XML is NOT?
XML is not itself a display language. in HTML, tags generally serve two purpose; they both add structure to documents and imply a certain display style. It defines a new paragraphs and bold or italic and some certain display features. XML is exclusively not a language to define how things looks on output screen, but only define specific contents. its a language to defining what rather than how.
Posted in
Tags:
