The document provides information about SAX (Simple API for XML), which is an event-based parser for XML documents. Unlike DOM parsers, SAX parsers do not create a parse tree in memory. SAX parsers read XML documents sequentially from top to bottom and generate events to notify applications as elements, attributes, and text are encountered. The document discusses why SAX is used, supported languages, versions of SAX, popular SAX APIs, and how SAX parsing works through callback methods in a ContentHandler interface.
The document discusses two common XML parsers - DOM and SAX. DOM builds an in-memory tree representation of the entire XML document, allowing random access. SAX is event-based and parses the document sequentially, notifying the application of elements and attributes through callback methods. DOM is used when random access or rearranging elements is needed, while SAX is better for large documents or streaming data. Common DOM and SAX methods are also outlined.
WSDL is an XML-based language used to describe web services. A WSDL document defines services, operations, and messages. It specifies where services are located and how they can be accessed. Key elements include: definitions, types, message, portType, binding, port, and service. WSDL allows clients to discover and interact with web services in a standardized, platform-independent manner.
This document discusses XML query language XPath and navigation. It describes how XPath allows querying XML documents by addressing elements and text using a path-like notation. XPath expressions are evaluated based on a context node and node-set. The document also covers XPointer for pointing to specific data within XML documents, and how XPath can be used with the XML DOM and XPathNavigator class in .NET.
This document provides an introduction to XML, including:
- XML stands for eXtensible Markup Language and allows users to define their own tags to provide structure and meaning to data.
- XML documents use elements with start and end tags to organize content in a hierarchical, tree-like structure. Elements can contain text or other nested elements.
- Attributes within start tags provide additional metadata about elements. Well-formed XML documents must follow syntax rules to be valid.
The document discusses XML document structure and XML schema. It provides information on the key components of an XML document including the XML declaration, document type declaration, element data, attribute data, and character data. It then describes XML schema in detail, explaining that it defines the structure of an XML document. Key aspects of XML schema covered include elements, attributes, simple vs complex types, and restrictions.
Web services allow for integration both within and between organizations through standardized XML messaging over the internet. The core technologies that enable web services are SOAP, which defines a standard messaging protocol, WSDL, which describes service interfaces, and UDDI, which allows services to be published and discovered. SOAP uses XML for flexible, self-describing messages and takes advantage of XML features like namespaces and schemas. It defines an envelope, header and body structure. Common uses of web services include processing purchase orders, answering inquiries, and processing shipment requests across organizational boundaries without tight coupling between partners.
This document discusses the structure and components of an XML document. It explains that an XML document consists of elements, attributes, comments, processing instructions, and a document type declaration. It describes each of these components in detail, including their purpose and general syntax. The document type declaration identifies the document and can reference an internal or external DTD that defines the valid elements and attributes.
The document discusses two common XML parsers - DOM and SAX. DOM builds an in-memory tree representation of the entire XML document, allowing random access. SAX is event-based and parses the document sequentially, notifying the application of elements and attributes through callback methods. DOM is used when random access or rearranging elements is needed, while SAX is better for large documents or streaming data. Common DOM and SAX methods are also outlined.
WSDL is an XML-based language used to describe web services. A WSDL document defines services, operations, and messages. It specifies where services are located and how they can be accessed. Key elements include: definitions, types, message, portType, binding, port, and service. WSDL allows clients to discover and interact with web services in a standardized, platform-independent manner.
This document discusses XML query language XPath and navigation. It describes how XPath allows querying XML documents by addressing elements and text using a path-like notation. XPath expressions are evaluated based on a context node and node-set. The document also covers XPointer for pointing to specific data within XML documents, and how XPath can be used with the XML DOM and XPathNavigator class in .NET.
This document provides an introduction to XML, including:
- XML stands for eXtensible Markup Language and allows users to define their own tags to provide structure and meaning to data.
- XML documents use elements with start and end tags to organize content in a hierarchical, tree-like structure. Elements can contain text or other nested elements.
- Attributes within start tags provide additional metadata about elements. Well-formed XML documents must follow syntax rules to be valid.
The document discusses XML document structure and XML schema. It provides information on the key components of an XML document including the XML declaration, document type declaration, element data, attribute data, and character data. It then describes XML schema in detail, explaining that it defines the structure of an XML document. Key aspects of XML schema covered include elements, attributes, simple vs complex types, and restrictions.
Web services allow for integration both within and between organizations through standardized XML messaging over the internet. The core technologies that enable web services are SOAP, which defines a standard messaging protocol, WSDL, which describes service interfaces, and UDDI, which allows services to be published and discovered. SOAP uses XML for flexible, self-describing messages and takes advantage of XML features like namespaces and schemas. It defines an envelope, header and body structure. Common uses of web services include processing purchase orders, answering inquiries, and processing shipment requests across organizational boundaries without tight coupling between partners.
This document discusses the structure and components of an XML document. It explains that an XML document consists of elements, attributes, comments, processing instructions, and a document type declaration. It describes each of these components in detail, including their purpose and general syntax. The document type declaration identifies the document and can reference an internal or external DTD that defines the valid elements and attributes.
The document discusses XML schemas, explaining that they define elements, attributes, and data types that can be used in XML documents. It covers creating simple and complex elements, declaring data types, and grouping elements using sequences, groups, and choices. The document also provides examples of how to define attributes and create user-defined data types in an XML schema.
This document provides an overview of various CSS topics including comments, colors, text formatting, positioning, and cross-browser compatibility. It explains concepts like using hexadecimal color codes, text properties like alignment and decoration, positioning elements with static, relative, absolute and fixed positioning, and strategies for aligning elements and dealing with browser inconsistencies.
XML is an extensible markup language that was designed to store and transport data. It allows data to be shared across different systems, hardware, and software. XML has several advantages over HTML including separating data from presentation, simplifying data sharing and transport, and making data more available. XML documents use tags to define elements and can also use attributes. XML documents must follow syntax rules to be well-formed, such as having matching start and end tags and properly nested elements.
The document discusses the XML DOM (Document Object Model). It defines the DOM as a standard for accessing and manipulating XML documents through a tree structure representation. The DOM defines all elements in an XML document as nodes that can be traversed and modified. It outlines DOM properties and methods for navigating and manipulating the node tree. Advantages of the DOM include its traversable and modifiable tree structure, while disadvantages include higher resource usage compared to SAX parsing.
SOAP is a simple and flexible messaging framework for transferring information specified in the form of an XML infoset between an initial SOAP sender and ultimate SOAP receiver.
The document describes what an XML Schema is and its key components and purposes. It defines an XML Schema as describing the structure of an XML document, and that it can define elements, attributes, element sequence and number, data types, and default values. It compares XML Schemas to DTDs, noting schemas are more powerful and support namespaces and data types. The document provides examples of using XML Schema to define simple and complex elements, attributes, and restrictions.
The document provides an overview of a seminar on RESTful web services. It discusses what REST is, its characteristics and principles, and compares RESTful architectures to SOAP. Key points covered include how REST focuses on a system's resources and how they are addressed and transferred over HTTP, the client-server interaction style of REST, and advantages of REST like scalability and loose coupling between components.
XML is a markup language designed to transport and store data. It was created to be self-descriptive and allows users to define their own elements. XML separates data from presentation and is used to create new internet languages, simplify data storage and sharing, and transport and make data more available across different platforms. XML documents form a tree structure with elements nested within other elements.
The Semantic Web #9 - Web Ontology Language (OWL)Myungjin Lee
This is a lecture note #9 for my class of Graduate School of Yonsei University, Korea.
It describes Web Ontology Language (OWL) for authoring ontologies.
The document provides an overview of the semantic web including:
1. It describes the key technologies that power the semantic web such as RDF, RDFS, OWL, and SPARQL which allow data to be shared and reused across applications.
2. It discusses semantic web themes like linked data, vocabularies, and inference which enable data from multiple sources to be integrated and new insights to be discovered.
3. It outlines current and future applications of the semantic web such as in e-commerce, online advertising, and government where semantic technologies can enhance search, personalization and data sharing.
This document provides an introduction to XML. It discusses what XML is, its advantages over binary formats, and some common XML languages such as XHTML, SVG, and MathML. It also covers XML rules for documents to be well-formed and valid, and provides examples of XML code.
DOM and SAX are two APIs for working with XML documents. DOM loads the entire XML document into memory as a tree structure, allowing manipulation of the document. SAX is event-based and reads the XML document sequentially, invoking callback functions at element boundaries. Compared to DOM, SAX uses less memory but only allows reading of the document. Both APIs are supported across many programming languages including PHP.
The document discusses XML (eXtensible Markup Language) in 3 paragraphs:
1) It defines XML as a markup language used to provide extra information about a document by adding tags. HTML uses tags to tell browsers how to display documents, while XML tags give readers an idea of what the data means and separates presentation from data.
2) XML documents are used to transfer data, often over the internet. XML subsets are designed for particular applications like RSS for news feeds. Fields also have their own subsets registered with the W3C.
3) XML is popular because it allows complex structured data to be transmitted efficiently as a simple text stream but also processed as a rich object model in receiving applications.
HTML allows images and tables to be inserted into web pages. Images are added using the <IMG> tag which specifies attributes like the image source URL, height, width, and alternative text. Tables organize data into rows and columns and use <TABLE>, <TR>, <TH>, and <TD> tags. Attributes control table properties such as borders, cell padding, alignment, column spans, and row spans. Captions can be added above or below tables using <CAPTION> tags.
If you are using jQuery, you need to understand the Document Object Model and how it accounts for all the elements inside any HTML document or Web page.
DTD stands for Document Type Definition and is used to define the structure and elements of an XML document. It allows you to create rules for elements within XML documents and ensures XML documents conform to the DTD. A DTD can be internal, within the XML document, or external, in a separate file. It uses elements, attributes, and operators to define elements, attributes, data types, cardinality, and sequences within an XML document.
This is the material of my technical training about "Fundamentals of Web" to non-developers, especially to business people. In this presentation, I tried to cover concepts with details that everyone can understand. Even though most of the information I mention verbally in the training, the slides could help the ones who are not very familiar with web and web applications.
The document defines the Document Object Model (DOM) as an application programming interface (API) for HTML and XML documents that defines the logical structure of a document and how it can be accessed and manipulated programmatically. The DOM is a W3C standard separated into three parts - the core DOM for any structured document, the XML DOM for XML documents, and the HTML DOM for HTML documents. The DOM provides a standard programming interface that can be used across various environments and applications to dynamically access and update the content, structure, and style of documents.
CSS3 is an update to the CSS2.1 specification that introduces many new features and modules. Some key CSS3 modules include selectors, backgrounds and borders, text effects, transformations, transitions, multiple columns, and user interface. CSS3 allows for rounded borders using border-radius, box shadows using box-shadow, and image borders using border-image. Other CSS3 properties include text-shadow, word-wrap, transforms like rotate and scale, transitions for animated effects, multiple columns layout, and user interface features like resizing and outlines. Support for CSS3 varies across browsers.
The document discusses XML DOM and SAX, which are standards for accessing and manipulating XML documents. XML DOM defines objects and properties of XML elements and methods to access them, providing a standard way to get, add, or modify XML data. SAX is an event-based standard that parses XML sequentially, reporting elements as they are encountered. It uses less memory than DOM but doesn't allow random access. Both are used for working with XML programmatically.
The document discusses XML DOM and SAX, which are standards for accessing and manipulating XML documents. XML DOM defines a standard object model for XML that represents an XML document as nodes and objects. It allows programs to dynamically access and update the content, structure, and style of XML documents. SAX is an event-based standard that processes XML documents sequentially by reporting parsing events to callbacks as it encounters them during parsing. Unlike DOM, SAX does not load the entire document into memory at once.
The document discusses XML schemas, explaining that they define elements, attributes, and data types that can be used in XML documents. It covers creating simple and complex elements, declaring data types, and grouping elements using sequences, groups, and choices. The document also provides examples of how to define attributes and create user-defined data types in an XML schema.
This document provides an overview of various CSS topics including comments, colors, text formatting, positioning, and cross-browser compatibility. It explains concepts like using hexadecimal color codes, text properties like alignment and decoration, positioning elements with static, relative, absolute and fixed positioning, and strategies for aligning elements and dealing with browser inconsistencies.
XML is an extensible markup language that was designed to store and transport data. It allows data to be shared across different systems, hardware, and software. XML has several advantages over HTML including separating data from presentation, simplifying data sharing and transport, and making data more available. XML documents use tags to define elements and can also use attributes. XML documents must follow syntax rules to be well-formed, such as having matching start and end tags and properly nested elements.
The document discusses the XML DOM (Document Object Model). It defines the DOM as a standard for accessing and manipulating XML documents through a tree structure representation. The DOM defines all elements in an XML document as nodes that can be traversed and modified. It outlines DOM properties and methods for navigating and manipulating the node tree. Advantages of the DOM include its traversable and modifiable tree structure, while disadvantages include higher resource usage compared to SAX parsing.
SOAP is a simple and flexible messaging framework for transferring information specified in the form of an XML infoset between an initial SOAP sender and ultimate SOAP receiver.
The document describes what an XML Schema is and its key components and purposes. It defines an XML Schema as describing the structure of an XML document, and that it can define elements, attributes, element sequence and number, data types, and default values. It compares XML Schemas to DTDs, noting schemas are more powerful and support namespaces and data types. The document provides examples of using XML Schema to define simple and complex elements, attributes, and restrictions.
The document provides an overview of a seminar on RESTful web services. It discusses what REST is, its characteristics and principles, and compares RESTful architectures to SOAP. Key points covered include how REST focuses on a system's resources and how they are addressed and transferred over HTTP, the client-server interaction style of REST, and advantages of REST like scalability and loose coupling between components.
XML is a markup language designed to transport and store data. It was created to be self-descriptive and allows users to define their own elements. XML separates data from presentation and is used to create new internet languages, simplify data storage and sharing, and transport and make data more available across different platforms. XML documents form a tree structure with elements nested within other elements.
The Semantic Web #9 - Web Ontology Language (OWL)Myungjin Lee
This is a lecture note #9 for my class of Graduate School of Yonsei University, Korea.
It describes Web Ontology Language (OWL) for authoring ontologies.
The document provides an overview of the semantic web including:
1. It describes the key technologies that power the semantic web such as RDF, RDFS, OWL, and SPARQL which allow data to be shared and reused across applications.
2. It discusses semantic web themes like linked data, vocabularies, and inference which enable data from multiple sources to be integrated and new insights to be discovered.
3. It outlines current and future applications of the semantic web such as in e-commerce, online advertising, and government where semantic technologies can enhance search, personalization and data sharing.
This document provides an introduction to XML. It discusses what XML is, its advantages over binary formats, and some common XML languages such as XHTML, SVG, and MathML. It also covers XML rules for documents to be well-formed and valid, and provides examples of XML code.
DOM and SAX are two APIs for working with XML documents. DOM loads the entire XML document into memory as a tree structure, allowing manipulation of the document. SAX is event-based and reads the XML document sequentially, invoking callback functions at element boundaries. Compared to DOM, SAX uses less memory but only allows reading of the document. Both APIs are supported across many programming languages including PHP.
The document discusses XML (eXtensible Markup Language) in 3 paragraphs:
1) It defines XML as a markup language used to provide extra information about a document by adding tags. HTML uses tags to tell browsers how to display documents, while XML tags give readers an idea of what the data means and separates presentation from data.
2) XML documents are used to transfer data, often over the internet. XML subsets are designed for particular applications like RSS for news feeds. Fields also have their own subsets registered with the W3C.
3) XML is popular because it allows complex structured data to be transmitted efficiently as a simple text stream but also processed as a rich object model in receiving applications.
HTML allows images and tables to be inserted into web pages. Images are added using the <IMG> tag which specifies attributes like the image source URL, height, width, and alternative text. Tables organize data into rows and columns and use <TABLE>, <TR>, <TH>, and <TD> tags. Attributes control table properties such as borders, cell padding, alignment, column spans, and row spans. Captions can be added above or below tables using <CAPTION> tags.
If you are using jQuery, you need to understand the Document Object Model and how it accounts for all the elements inside any HTML document or Web page.
DTD stands for Document Type Definition and is used to define the structure and elements of an XML document. It allows you to create rules for elements within XML documents and ensures XML documents conform to the DTD. A DTD can be internal, within the XML document, or external, in a separate file. It uses elements, attributes, and operators to define elements, attributes, data types, cardinality, and sequences within an XML document.
This is the material of my technical training about "Fundamentals of Web" to non-developers, especially to business people. In this presentation, I tried to cover concepts with details that everyone can understand. Even though most of the information I mention verbally in the training, the slides could help the ones who are not very familiar with web and web applications.
The document defines the Document Object Model (DOM) as an application programming interface (API) for HTML and XML documents that defines the logical structure of a document and how it can be accessed and manipulated programmatically. The DOM is a W3C standard separated into three parts - the core DOM for any structured document, the XML DOM for XML documents, and the HTML DOM for HTML documents. The DOM provides a standard programming interface that can be used across various environments and applications to dynamically access and update the content, structure, and style of documents.
CSS3 is an update to the CSS2.1 specification that introduces many new features and modules. Some key CSS3 modules include selectors, backgrounds and borders, text effects, transformations, transitions, multiple columns, and user interface. CSS3 allows for rounded borders using border-radius, box shadows using box-shadow, and image borders using border-image. Other CSS3 properties include text-shadow, word-wrap, transforms like rotate and scale, transitions for animated effects, multiple columns layout, and user interface features like resizing and outlines. Support for CSS3 varies across browsers.
The document discusses XML DOM and SAX, which are standards for accessing and manipulating XML documents. XML DOM defines objects and properties of XML elements and methods to access them, providing a standard way to get, add, or modify XML data. SAX is an event-based standard that parses XML sequentially, reporting elements as they are encountered. It uses less memory than DOM but doesn't allow random access. Both are used for working with XML programmatically.
The document discusses XML DOM and SAX, which are standards for accessing and manipulating XML documents. XML DOM defines a standard object model for XML that represents an XML document as nodes and objects. It allows programs to dynamically access and update the content, structure, and style of XML documents. SAX is an event-based standard that processes XML documents sequentially by reporting parsing events to callbacks as it encounters them during parsing. Unlike DOM, SAX does not load the entire document into memory at once.
This document discusses different approaches to parsing XML documents in Java, including DOM, SAX, and StAX parsers.
It begins by explaining that an XML parser reads XML files and makes the information available to applications. It then describes two main parsing approaches: tree-based APIs like DOM that build an in-memory model of the XML document, and event-based APIs like SAX and StAX that parse the document sequentially and throw events.
DOM parsers create a full object model of the XML document that allows random access but uses more memory. SAX is a push-style event-based parser that is more memory efficient but provides less control. StAX is a pull-style parser that gives clients full control
The SAX parser is an event-based XML parser that does not build a DOM tree. It reads XML documents sequentially and notifies registered handlers of parsing events like start elements, end elements, and character data. SAX is useful for large documents since it has a smaller memory footprint than DOM. Handlers implement callback methods to process events. The DefaultHandler class provides empty implementations of required handler interfaces.
The document discusses XML (Extensible Markup Language), its structure and types of XML documents. It also describes two common XML parsers - DOM and SAX. DOM represents an XML document as a tree structure in memory, while SAX is an event-based parser that reads XML documents node-by-node without loading the entire document into memory. SAX typically uses less memory and is faster than DOM for large documents.
This document provides an overview of XML including:
- XML is a meta markup language used to define text document structures and represent textual data.
- XML examples show how it can be used to easily represent structured data for both human and machine readability.
- XML schemas are used to define the rules and structure for XML documents and provide data type definitions.
- XML documents form a tree structure with a single root element and hierarchical branching.
This presentation educates you about Python - XML Processing, XML Parser Architectures and APIs (Simple API for XML (SAX),Document Object Model (DOM) API), Parsing XML with SAX APIs, The make
_parser Method, The parse Method, The parseString Method.
For more topics stay tuned with learnbay.
SAX (Simple API for XML) and DOM (Document Object Model) both provide programmatic access to XML documents, but differ in their approaches. SAX processes XML documents as a stream of parsing events rather than building an in-memory tree. It is great for linear processing of large XML documents. Unlike DOM, SAX can only be used for parsing existing documents in a stream, not for generating documents. SAX notifies a client program through events as it reads an XML document sequentially.
This document provides an overview of DOM and SAX, two common XML APIs in Java. It describes the key differences between DOM and SAX, including that DOM builds an in-memory tree representation, while SAX parses the XML as a stream of events. The document also provides code examples for using SAX to parse XML and extract data, and examples of how to access and manipulate DOM trees after parsing XML.
This document summarizes key aspects of XML including:
- XML is a text-based format for describing data structures that is both human and machine readable.
- XML became a W3C standard in 1998 and is commonly used for exchanging data between disparate systems.
- Java can be used to generate, access, format, parse, validate, and transform XML data.
- XML documents have a root element containing other nested elements and attributes to describe hierarchical data.
- Well-formed XML documents follow syntax rules for proper nesting of start/end tags and quotes around attribute values.
- XML parsers like SAX and DOM are used to read XML documents sequentially or build a navigable tree structure in memory
- The DOM (Document Object Model) views an XML document as a tree structure where each node represents a component of the XML structure.
- The DOM parser constructs an internal representation of the XML data as a tree structure in memory, allowing traversal and manipulation of nodes.
- To validate an XML document using a schema with DOM, the parser factory is configured to create a validating parser, the schema language and source are set, and errors are handled.
The document discusses XML DOM and SAX. XML DOM defines a standard for accessing and manipulating XML documents and is a W3C standard. The XML DOM defines the objects and properties of all XML elements and methods to access them. SAX is an event-based parser API that provides an alternative to DOM for reading XML documents sequentially. SAX parsers have lower memory requirements than DOM parsers but validation requires access to the full document, which SAX does not provide.
XML documents can be represented and stored in memory as tree structures using models like DOM and XDM. XPath is an expression language used to navigate and select parts of an XML tree. It allows traversing elements and their attributes, filtering nodes by properties or position, and evaluating paths relative to a context node. While XPath expressions cannot modify the document, they are commonly used with languages like XSLT and XQuery which can transform or extract data from XML trees.
This document summarizes a seminar on XML and XML processors. It introduces XML and compares it to HTML. It describes the structure of an XML document including the prolog, data instance, and logical and physical structures. It also discusses XML processors and parsers, including DOM and SAX parsers. The document provides examples of DOM and SAX parsing approaches.
This document summarizes a seminar on XML and XML processors. It introduces XML and compares it to HTML. It describes the structure of an XML document including the prolog, data instance, and logical and physical structures. It also discusses XML processors and parsers, including DOM and SAX parsers. The document provides examples of DOM and SAX parsing approaches.
The XML DOM defines a standard for accessing and manipulating XML documents. It is a W3C standard that defines a model for XML documents and provides interfaces to dynamically access and modify elements, structure, and style. The XML DOM specifies objects and properties of all XML elements and methods to access them, allowing programs to get, change, add, or delete XML elements. SAX is an alternative XML parsing standard that is event-based and sequential, reporting each parsing event as it happens rather than retaining the full document structure in memory like the DOM.
Elasticsearch is a powerful open source search and analytics engine. It allows for full text search capabilities as well as powerful analytics functions. Elasticsearch can be used as both a search engine and as a NoSQL data store. It is easy to set up, use, scale, and maintain. The document provides examples of using Elasticsearch with Rails applications and discusses advanced features such as fuzzy search, autocomplete, and geospatial search.
XML is a markup language similar to HTML but designed for carrying data rather than displaying it. It allows users to define their own elements and tags. XML documents use tags to describe and structure information and can be displayed using CSS or transformed using XSL. Key benefits of XML include its ability to describe hierarchical data, separate data from presentation, and enable data sharing across different systems.
This document provides an overview of XML, XML schema, parsing XML, and GladeXML. It defines XML and its components like elements and attributes. It describes XML schema and provides a simple example. It explains how to parse an XML document into a DOM object and access elements. It also gives an overview of how GladeXML can dynamically load user interfaces from XML descriptions.
SAX is an event-based XML parser that handles XML documents as a stream. Unlike DOM parsers, SAX parsers do not build an in-memory tree representation. Instead, as it reads the XML tags and elements, it triggers callback methods in a handler class provided by the application. These callbacks provide information about the XML elements, attributes, and text being parsed. SAX is useful for parsing large XML documents as it has a lower memory footprint than DOM parsers.
Similar to Service Oriented Architecture - Unit II - Sax (20)
The document discusses software engineering and the software development life cycle. It describes the typical phases of software engineering including requirements specification, architectural design, detailed design, coding and testing, integration, and maintenance. It also discusses verification and validation activities to ensure the software meets specifications and requirements. Prototyping techniques are discussed as part of an iterative design process to overcome issues with incomplete requirements gathering.
Unit1 17-08-2020 HUMAN COMPUTER INTERACTIONRoselin Mary S
This document provides an overview of human-computer interaction (HCI). It discusses why HCI is important, defining HCI and describing the user, computer, and interaction. It then covers the different input and output channels humans use, including the senses of vision, hearing, touch, and motor control. For each input channel, it describes the anatomical structures and processing involved. The document emphasizes that understanding human factors is crucial for designing intuitive and effective interfaces.
This document discusses different classes of defects that can occur during software development and testing. It identifies four main defect classes:
1. Requirement/specification defects that occur early in ambiguous, incomplete, or contradictory requirements documents.
2. Design defects that happen when system components or their interactions are incorrectly designed, such as flaws in algorithms, control logic, or interface descriptions.
3. Coding defects resulting from errors implementing code, including issues with algorithms, control structures, data types, interfaces, and documentation.
4. Testing defects in test harnesses, cases, and procedures that could lead to incorrect or incomplete testing. The classes of defects guide strategies for test planning and design.
The document discusses 11 principles of software testing. It explains that a fault in code does not always produce a failure, as a failure only occurs when the software is unable to perform its required functions, while a fault is simply an error or defect in the code. It also discusses the roles of testers and how testing should be integrated into the software development lifecycle.
Service Oriented Architecture -Unit II - Modeling databases in xml Roselin Mary S
Modeling databases in xml
Steps:
1. Review the database schema.
2. Construct the desired XML document.
3. Define a schema for the XML document.
4. Create the JAXB binding schema.
5. Generate the JAXB classes based on the schema.
6. Develop a Data Access Object (DAO).
7. Develop a servlet for HTTP access.
The document discusses XSL (Extensible Stylesheet Language), which is used to style XML documents. Some key points:
- XSL is to XML what CSS is to HTML - it controls how XML documents are displayed.
- XSL has three main parts: XSLT for transforming XML, XPath for navigating XML, and XSL-FO for formatting XML.
- XSLT uses XSLT stylesheets to define transformation rules that are applied to XML documents to generate output like XML, HTML or text.
- Advantages of XSLT include being programming language independent and allowing output to be altered by modifying the XSL stylesheet without changing code.
Service Oriented Architecture- UNIT 2- XSLRoselin Mary S
The document discusses XSL (Extensible Stylesheet Language), which is used to style XML documents. It provides an overview of XSLT (XSL Transformations), XPath, and XSL-FO. It then gives more details on XSLT, explaining how XSLT stylesheets are used to define transformation rules that are applied to XML documents to generate formatted output. Key advantages of XSLT are that transformations are written separately from code, allowing for quick output changes. An example is provided of using XSLT to transform an XML document of student data into an HTML table for display.
XML is a markup language that focuses on data rather than presentation. It allows users to define their own elements and tags to structure information in a way that is understandable by both humans and machines. XML documents contain elements that describe the document's structure and content. Elements are delimited by tags like <tagname>element content</tagname> and may have attributes that provide additional information. The XML specification was developed by the World Wide Web Consortium to allow structured data to be shared across different systems.
ACEP Magazine edition 4th launched on 05.06.2024Rahul
This document provides information about the third edition of the magazine "Sthapatya" published by the Association of Civil Engineers (Practicing) Aurangabad. It includes messages from current and past presidents of ACEP, memories and photos from past ACEP events, information on life time achievement awards given by ACEP, and a technical article on concrete maintenance, repairs and strengthening. The document highlights activities of ACEP and provides a technical educational article for members.
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...University of Maribor
Slides from talk presenting:
Aleš Zamuda: Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapter and Networking.
Presentation at IcETRAN 2024 session:
"Inter-Society Networking Panel GRSS/MTT-S/CIS
Panel Session: Promoting Connection and Cooperation"
IEEE Slovenia GRSS
IEEE Serbia and Montenegro MTT-S
IEEE Slovenia CIS
11TH INTERNATIONAL CONFERENCE ON ELECTRICAL, ELECTRONIC AND COMPUTING ENGINEERING
3-6 June 2024, Niš, Serbia
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTjpsjournal1
The rivalry between prominent international actors for dominance over Central Asia's hydrocarbon
reserves and the ancient silk trade route, along with China's diplomatic endeavours in the area, has been
referred to as the "New Great Game." This research centres on the power struggle, considering
geopolitical, geostrategic, and geoeconomic variables. Topics including trade, political hegemony, oil
politics, and conventional and nontraditional security are all explored and explained by the researcher.
Using Mackinder's Heartland, Spykman Rimland, and Hegemonic Stability theories, examines China's role
in Central Asia. This study adheres to the empirical epistemological method and has taken care of
objectivity. This study analyze primary and secondary research documents critically to elaborate role of
china’s geo economic outreach in central Asian countries and its future prospect. China is thriving in trade,
pipeline politics, and winning states, according to this study, thanks to important instruments like the
Shanghai Cooperation Organisation and the Belt and Road Economic Initiative. According to this study,
China is seeing significant success in commerce, pipeline politics, and gaining influence on other
governments. This success may be attributed to the effective utilisation of key tools such as the Shanghai
Cooperation Organisation and the Belt and Road Economic Initiative.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSIJNSA Journal
The smart irrigation system represents an innovative approach to optimize water usage in agricultural and landscaping practices. The integration of cutting-edge technologies, including sensors, actuators, and data analysis, empowers this system to provide accurate monitoring and control of irrigation processes by leveraging real-time environmental conditions. The main objective of a smart irrigation system is to optimize water efficiency, minimize expenses, and foster the adoption of sustainable water management methods. This paper conducts a systematic risk assessment by exploring the key components/assets and their functionalities in the smart irrigation system. The crucial role of sensors in gathering data on soil moisture, weather patterns, and plant well-being is emphasized in this system. These sensors enable intelligent decision-making in irrigation scheduling and water distribution, leading to enhanced water efficiency and sustainable water management practices. Actuators enable automated control of irrigation devices, ensuring precise and targeted water delivery to plants. Additionally, the paper addresses the potential threat and vulnerabilities associated with smart irrigation systems. It discusses limitations of the system, such as power constraints and computational capabilities, and calculates the potential security risks. The paper suggests possible risk treatment methods for effective secure system operation. In conclusion, the paper emphasizes the significant benefits of implementing smart irrigation systems, including improved water conservation, increased crop yield, and reduced environmental impact. Additionally, based on the security analysis conducted, the paper recommends the implementation of countermeasures and security approaches to address vulnerabilities and ensure the integrity and reliability of the system. By incorporating these measures, smart irrigation technology can revolutionize water management practices in agriculture, promoting sustainability, resource efficiency, and safeguarding against potential security threats.
2. • SAX (Simple API for XML) is an event-based parser for XML
documents.
• Unlike a DOM parser, a SAX parser creates no parse tree.
• SAX is a streaming interface for XML, which means that
applications using SAX receive event notifications about the
XML document being processed an element, and attribute,
at a time in sequential order starting at the top of the
document, and ending with the closing of the ROOT
element.
– Reads an XML document from top to bottom, recognizing the
tokens that make up a well-formed XML document.
– Tokens are processed in the same order that they appear in the
document.
– Reports the application program the nature of tokens that the
parser has encountered as they occur.
– The application program provides an "event" handler that must
be registered with the parser.
– As the tokens are identified, callback methods in the handler are
invoked with the relevant information.7/16/2019 2Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
3. Why Do I Need SAX?
• to pull out the text from a document or to look for attributes of
specific tags, we might be able to do some of the work using a tool
or maybe XSLT, but these solutions have their limitations.
• writing a tool or a standalone program to process XML, SAX is a
good way to do it.
• Many applications today can be customized using an XML file.
These files have replaced the traditional “properties” files for
reasons of uniformity and richness of expression.
• Instead of spending a lot of your time writing a parser to read XML
files, you might as well use SAX.
• SAX is completely free, so it can be embedded in a larger
application without royalty fees or even copyright notices.
• Some SAX parsers can validate a document against a Document
Type Definition (DTD).
• Validating parsers can also tell specifically where validation has
failed.
7/16/2019 3Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
4. SAX Parser
• When should I use it?
– Large documents
– Memory constrained devices
• When should I use something else?
– If you need to modify the document
– SAX doesn’t remember previous events unless you
write explicit code to do so.
7/16/2019 4Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
5. SAX Parser
• Which languages are supported?
– Java
– Perl
– C++
– Python
7/16/2019 5Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
6. SAX Parser
• Versions
– SAX 1 introduced in May 1998
– SAX 2.0 introduced in May 2000 and adds support
for
• namespaces
• filter chains
• querying and setting properties in the parser
7/16/2019 6Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
7. SAX Parser
• Some popular SAX APIs
– Apache XML Project Xerces Java Parser
http://xml.apache.org/xerces-j/index.html
– IBM’s XML for Java (XML4J)
http://www.alphaworks.ibm.com/formula/xml
– For a complete list, see
http://www.megginson.com/SAX
7/16/2019 7Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
8. DOM SAX
Tree model parser (Object based) (Tree of
nodes).
Event based parser (Sequence of events).
DOM loads the file into the memory and
then parse- the file
SAX parses the file as it reads it, i.e. parses
node by node.
Has memory constraints since it loads the
whole XML file before parsing.
No memory constraints as it does not
store the XML content in the memory.
DOM is read and write (can insert or
delete nodes).
SAX is read only i.e. can’t insert or delete
the node
If the XML content is small, then prefer
DOM parser.
Use SAX parser when memory content is
large.
Backward and forward search is possible
for searching the tags and evaluation of
the information inside the tags. So this
gives the ease of navigation.
SAX reads the XML file from top to
bottom and backward navigation is not
possible.
Slower at run time. Faster at run time.
7/16/2019 8Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
9. SAX Basics
• build a content handler by creating a Java
class that implements the ContentHandler
interface in the org.xml.sax package.
• Once we have a content handler, simply
register it with a SAX XMLReader.
• set up the input source, and start the parser.
• the methods in our content handler will be
called when the parser encounters elements,
text, and other data.
7/16/2019 9Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
10. <?xml version=”1.0” encoding=”UTF-8”?>
<fiction>
<book author=”Herman Melville”>Moby Dick</book>
</fiction>
Generated Events:
start document
start element: fiction
start element: book (including attributes)
characters: Moby Dick
end element: book
end element: fiction
end document
7/16/2019 10Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
11. SAX Packages
• The SAX 2.0 API consists of two standard
packages and one extension package.
• The standard packages
– org.xml.sax
– org.xml.helpers.
• The org.xml.sax package contains the basic
classes, interfaces, and exceptions needed for
parsing documents.
7/16/2019 11Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
12. The org.xml.sax Package
Name Description
AttributeList This interface has been replaced by the SAX2
Attributes interface, which includes namespace support.
Attributes Interface for a list of XML attributes.
ContentHandler Receives notification of the logical content of a document.
DocumentHandler Deprecated. This interface has been replaced by the SAX2
ContentHandler interface, which includes namespace support.
DTDHandler Receives notification of basic DTD-related events.
EntityResolver Basic interface for resolving entities.
ErrorHandler Basic interface for SAX error handlers.
Locator Interface for associating a SAX event with a document Location.
Parser Deprecated. This interface has been replaced by the SAX2
XMLReader interface, which includes namespace support.
XMLFilter Interface for an XML filter.
XMLReader Interface for reading an XML document using callbacks.
Interfaces
7/16/2019 12
Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
13. HandlerBase Deprecated. This class works with the deprecated
DocumentHandler interface.
InputSource A single input source for an XML entity.
SAXException Encapsulates a general SAX error or warning.
SAXNotRecognizedException Exception class for an unrecognized identifier.
SAXNotSupportedException Exception class for an unsupported operation.
SAXParseException Encapsulates an XML parse error or warning.
Classes
Exceptions
7/16/2019 13Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
14. ContentHandler Interface
This interface specifies the callback methods that the SAX parser uses to notify an
application program of the components of the XML document that it has seen.
void startDocument() − Called at the beginning of a document.
void endDocument() − Called at the end of a document.
void startElement(String uri, String localName, String qName, Attributes atts) − Called at
the beginning of an element.
void endElement(String uri, String localName,String qName) − Called at the end of an
element.
void characters(char[] ch, int start, int length) − Called when character data is
encountered.
void ignorableWhitespace( char[] ch, int start, int length) − Called when a DTD is present
and ignorable whitespace is encountered.
void processingInstruction(String target, String data) − Called when a processing
instruction is recognized.
void setDocumentLocator(Locator locator)) − Provides a Locator that can be used to
identify positions in the document.
void skippedEntity(String name) − Called when an unresolved entity is encountered.
void startPrefixMapping(String prefix, String uri) − Called when a new namespace
mapping is defined.
void endPrefixMapping(String prefix) − Called when a namespace definition ends its scope.
7/16/2019 14Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
15. What is SAX Parsing?
• Callback Methods
– The SAX API has a default handler class built in so
you don’t have to re-implement the interfaces every
time (org.xml.sax.helpers.DefaultHandler)
– The five most common methods to override are:
• startElement(String uri, String lname, String qname,
Attributes atts)
• endDocument(String uri, String lname, String qname)
• characters(char text[], int start, int length)
• startDocument()
• endDocument()
7/16/2019 15Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
16. • startElement()
– Four parameters:
• String uri = the namespace URI (Uniform Resource Identifier)
• String lname = the local name of the element
• String qname = the qualified name of the element
• Attributes atts = list of attributes for this element
– If the current element is a complex element, an object of
the appropriate type is created and pushed on to the stack
– If the element is simple, a StringBuffer is pushed on to the
stack, ready to accept character data
7/16/2019 16Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
17. • endElement()
– Three parameters:
• String uri = the namespace URI (Uniform Resource Identifier)
• String lname = the local name of the element
• String qname = the qualified name of the element
– The topmost element on the stack is popped,
converted to the proper type, and inserted into its
parent, which now occupies the top of the stack
(unless this is the root element – special handling
required)
7/16/2019 17Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
18. • characters()
– Three parameters:
• char text[] = character array containing the entire XML
document
• int start = starting index of current data in text[]
• int length = ending index of current data in text[]
– When the parser encounters raw text, it passes a char
array containing the actual data, the starting position,
and the length of data to be read from the array
– The implementation of the callback method inserts
the data into the StringBuffer located on the top of the
stack
– Can lead to confusion because of:
• No guarantee that a single stretch of characters results in
one call to characters()
• It stores all characters, including whitespace, encountered by
the parser
7/16/2019 18Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
19. Attributes Interface
This interface specifies methods for processing
the attributes connected to an element.
• int getLength() − Returns number of attributes.
• String getQName(int index)
• String getValue(int index)
• String getValue(String qname)
7/16/2019 19Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
20. • The org.xml.sax.helpers package contains
additional classes that can simplify some of
coding and make it more portable.
• We can find a number of adapters that
implement many of the handler interfaces, so
you don’t need to fill in all the methods
defined in the interfaces.
7/16/2019 20Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
22. • The org.xml.sax.ext package is an extension
that is not shipped with all implementations.
• It contains two handler interfaces for
capturing declaration and lexical events
7/16/2019 22Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
23. To list all the student elements details including attribute & Child
import java.io.File;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
public class SAXParserDemo
{
public static void main(String[] args)
{
try
{
File inputFile = new File(“src/students.xml");
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
UserHandler userhandler = new UserHandler();
saxParser.parse(inputFile, userhandler);
}
catch (Exception e) { e.printStackTrace(); }
}
}
7/16/2019 23
Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
25. @Override
public void endElement(String uri, String localName, String qName)
throws SAXException
{
if (qName.equalsIgnoreCase("student"))
{ System.out.println("End Element :" + qName); }
}
@Override
public void characters(char ch[], int start, int length)
throws SAXException
{
if (bname)
{
System.out.println("Name: " + new String(ch, start, length));
bname = false;
}
else if (bgender)
{
System.out.println(“Gender: " + new String(ch, start, length));
bgender = false;
}
else if (bmarks) {
System.out.println("Marks: " + new String(ch, start, length));
bmarks = false;
}7/16/2019 25
26. SAXQueryDemo.java
package com.tutorialspoint.xml;
import java.io.File;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
public class SAXQueryDemo
{
public static void main(String[] args)
{
try
{
File inputFile = new File("src/students.xml");
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
UserHandler userhandler = new UserHandler();
saxParser.parse(inputFile, userhandler);
}
catch (Exception e) { e.printStackTrace(); }
}
}7/16/2019 26Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
27. class UserHandler extends DefaultHandler
{
boolean bname = false;
boolean bgender = false;
boolean bmarks = false;
String rollNo = null;
@Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException
{
if (qName.equalsIgnoreCase("student"))
{ rollNo = attributes.getValue("id");}
if(("001").equals(rollNo) && qName.equalsIgnoreCase("student"))
{ System.out.println("Start Element :" + qName); }
if (qName.equalsIgnoreCase("name")) { bname = true;}
else if (qName.equalsIgnoreCase("gender")) { bgender = true;}
else if (qName.equalsIgnoreCase("marks")) { bmarks = true; }
}
7/16/2019 27Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
28. @Override
public void endElement(String uri, String localName, String qName)
throws SAXException
{
if (qName.equalsIgnoreCase("student"))
{
if(("001").equals(rollNo) && qName.equalsIgnoreCase("student"))
System.out.println("End Element :" + qName);
}
}
@Override
public void characters(char ch[], int start, int length)
throws SAXException
{
if (bname && ("001").equals(rollNo))
{
System.out.println(" Name: " + new String(ch, start, length));
bname = false;
}
else if (bgender && ("001").equals(rollNo))
{
System.out.println("Gender: " + new String(ch, start, length));
bgender = false;
}
else if (bmarks && ("001").equals(rollNo))
{
System.out.println("Marks: " + new String(ch, start, length));
29. Validation
• SAX parsers come in two varieties: validating and
nonvalidating.
– Validating parsers can determine whether an XML document is
valid based on a Document Type Definition (DTD) or Schema.
– The SAX parser shipped with Apache Xerces is a validating
parser.
• In order to use validation, we must turn it on by setting the
validation feature to true.
• If we try to turn on validation with a nonvalidating parser, a
SAXNotSupportedException will bethrown.
• If the parser does not recognize the feature, a
SAXNotRecognizedException will be thrown. This helps in
determining whether we mistyped the feature name.
7/16/2019 29Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
30. • ErrorHandler contains three methods that can
be used to determine whether a document is
well formed and valid.
• Either error() or warning() will be called if the
document is well formed but not valid(that is,
it violates the rules of the DTD), and
fatalError() will be called if the document is
not well formed.
7/16/2019 30Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
31. Validator
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
public class SAXValidator extends DefaultHandler
{
private boolean valid;
private boolean wellFormed;
public SAXValidator() { valid = true; wellFormed = true;}
public void startDocument() { System.out.println(“***Start of Document***”);}
public void endDocument() {System.out.println(“***End of Document***”);}
public void error(SAXParseException e) { valid = false;}
public void fatalError(SAXParseException e) {wellFormed = false;}
7/16/2019 31Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
32. public void warning(SAXParseException e) {valid = false;}
public boolean isValid() {return valid;}
public boolean isWellFormed() { return wellFormed;}
public static void main(String args[]) throws Exception
{
if (args.length != 1)
{
System.err.println(“Usage: java SAXValidate <xml-file>”);
System.exit(1);
}
XMLReader parser =
XMLReaderFactory.createXMLReader(“org.apache.xerces.parsers.SAXParser”);
parser.setFeature(“http://xml.org/sax/features/validation”, true);
7/16/2019 32Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
33. SAXValidator handler = new SAXValidator();
parser.setContentHandler(handler);
parser.setErrorHandler(handler);
parser.parse(new InputSource(new FileReader(args[0])));
if (!handler.isWellFormed()) {System.out.println(“Document is NOT well formed.”);}
if (!handler.isValid()) { System.out.println(“Document is NOT valid.”);}
if (handler.isWellFormed() && handler.isValid())
{ System.out.println(“Document is well formed and valid.”);}
}
}
7/16/2019 33Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY
34. Lexical Events
• We can receive the events comments, CDATA,
and DTD references using an extension
interface called LexicalHandler.
• LexicalHandler is part of the org.xml.sax.ext
package, which is not necessarily supported
by all SAX implementations.
• Xerces provides support for the extension
package.
7/16/2019 34Dr.S.ROSELIN MARY HOD/CSE , ANAND INSTITUTE OF HIGHER TECHNOLOGY