Java API for XML Processing (JAXP)

Total Page:16

File Type:pdf, Size:1020Kb

Java API for XML Processing (JAXP) Java API for XML Processing (JAXP) • API that provides an abstraction layer to XML parser implementations (specifically implementations of DOM and SAX), and applications that process Extensible Stylesheet Language Transformations (XSLT) • JAXP is is a layer above the parser APIs that makes it easier to perform some vendor-specific tasks in a vendor-neutral fashion. JAXP employs the Abstract Factory design pattern to provide a plugability layer, which allows you to plug in an implementation of DOM or SAX, or an application that processes XSLT • The primary classes of the JAXP plugability layer are javax.xml.parsers.DocumentBuilderFactory, javax.xml.parsers.SAXParserFactory, and javax.xml.transform.TransformerFactory. • Classes are abstract so you must ask the specific factory to create an instance of itself, and then use that instance to create a javax.xml.parsers.DocumentBuilder, javax.xml.parsers.SAXParser, or javax.xml.transform.Transformer, respectively. • DocumentBuilder abstracts the underlying DOM parser implementation, SAXParser the SAX parser implementation, and Transformer the underlying XSLT processor. DocumentBuilder, SAXParser, and Transformer are also abstract classes, so instances of them can only be obtained through their respective factory. JAXP Example - 1 import java.io.*; import javax.xml.*; import org.w3c.dom.Document; import org.xml.sax.SAXException; import javawebbook.sax.ContentHandlerExample; public class JAXPTest { public static void main(String[] args) throws Exception { File xmlFile = new File(args[0]); File xslFile = new File(args[1]); File xsltResultFile = new File(args[2]); DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilderFactory.setNamespaceAware(true); docBuilderFactory.setValidating(true); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(xmlFile); JAXP Example - 2 SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); saxParserFactory.setNamespaceAware(true); saxParserFactory.setValidating(true); SAXParser saxParser = saxParserFactory.newSAXParser(); saxParser.parse(xmlFile, new ContentHandlerExample()); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Source xslSource = new StreamSource(xslFile); Transformer transformer = transformerFactory.newTransformer(xslSource); Source xmlSource = new StreamSource(xmlFile); Result xsltResult = new StreamResult(xsltResultFile); transformer.transform(xmlSource, xsltResult); } } JDOM and dom4j • DOM is useful but can be awkward to use because it was designed to be independent of any programming language. • Implementations that take advantage of the strengths of Java can be easier to use. Examples are JDOM (http://jdom.org) and dom4j (http://dom4j.org). • Both JDOM and dom4j are open source and can be used with JAXP • Both APIs take advantage of built-in Java classes, provide an object model to represent an XML tree, are intuitive and easy to use, integrate well with SAX and DOM, support XPath, and are more efficient than DOM. • JDOM is built on concrete classes and dom4j on interfaces. • dom4j is more flexible, yet more complex. • dom4j additional features over JDOM like event-based processing for handling very large documents or streamed documents. • dom4j also aims to be a more complete solution than JDOM, whose goal is to solve only about 80% of the Java/XML problems. Transforming XML Using XSLT • Extensible Stylesheet Language Transformations (XSLT) are part of the XML Stylesheet Language (XSL). • An XSLT stylesheet, which is simply and XML document, contains instructions on how an XML document should be transformed by an XSLT processor. XSLT is a full programming language, expressed as XML, designed specifically for reformatting XML documents. There are more than 50 XSLT elements and more than 200 attributes. • XSL Transformations provide a way to translate the semantic descriptions of an XML document to presentational descriptions, e.g., translate XML to HTML. • XSL Transformations allow XML data to be reordered, permit the display of attributes, and allow elements to be displayed in an order other than that in which they are given in the XML document. XSL Transformations can also add static data to the output, such as XHTML tags and CSS style specifications. XSLT, cont. • Writing an XSLT stylesheet simply involves writing templates for those elements that are to be a part of the output. The XSLT processor traverses the supplied XML document tree looking for elements that match these templates. Templates may include XML element and attribute contents, other markup, such as XHTML tags, and other literal and computed values. For example: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="memo"> <xsl:apply-templates select="to/name" /> </xsl:template> <xsl:template match="name"> <xsl:for-each select="forename"> <xsl:value-of select="."/><xsl:text> <xsl:text> </xsl:for-each> <xsl:value-of select="surname" /> <br /> </xsl:template> </xsl:stylesheet> XSLT, cont. • An XSLT processor that was supplied this XSLT stylesheet and a valid XML document would, for each <memo><to><name> element combination it encountered, iterate over the nested <forename> elements outputting the value of each <forename> element followed by a space, then the value of the <surname> element followed by the markup <br />. • <xsl:template match="memo"> matches a <memo> element as the root of the XML document. It specifies <xsl:apply- templates select="to/name">, which means apply any <xsl:template> tags that match a <name> element, which is nested within a <to> element. • <xsl:template match="name"> matches the <name> element, within which <xsl:for-each select="forename"> iterates over any <forename> elements using <xsl:value-of select="."/> to output the <forename> element value and <xsl:text> to output a space. Without <xsl:text> the XSLT processor would remove the whitespace. XSLT, cont. • <xsl:value-of select="surname" /> then outputs the value of a matched <surname> tag nested within a <name> tag. An <xsl:value-of > element can be used for computation, but is most often used to select elements or attributes of the input document for writing to output. The select attribute of <xsl:value-of > is an XPath expression that determines what value from the input document is to be written to the output. •The <br /> tag is simply XHTML markup; it is not in the xsl namespace, so it will be copied to the output just like any other text. • The default behavior of XSLT is to copy the element values and whitespace outside of elements to the output document. A template at the outermost level can be used to specify which inner elements are to be used, and in what order. XPath • XPath expressions look a lot like directory path expressions for operating systems; both describe a path through a tree structure. Absolute paths begin with a / and start at the root element of the document. The XSLT processor traverses the input document in preorder fashion and keeps track of its current position. The current position is called the context node, and it is referred to with a period. Relative path specifications are relative to the context node and do not begin with a slash. Possible XPath specifications and their meanings: / – The root of the document. – Contents of the current context node. to/text() – Contents of the text node of the <to> element /memo/to/name – <name> elements that are a child element of /memo/to. //surname –All <surname> elements, even if at different levels. /memo/to/name[1] –First <name> child element of /memo/to. /memo/to/name[last()] – Last <name> child element of /memo/to. @date – Contents of the date attribute of the current context element. /memo@date – Contents of the date attribute of the <memo> element. • XPath also includes functions and operators, which were’nt discussed. Simple XSLT Example • The following example illustrates transforming an XML document into an HMTL TABLE – Input • Style sheet (XSL): table.xsl • XML document: acronym.xml – Output • HTML document: acronym.html XSLT Stylesheet: table.xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" /> <xsl:template match="/"> <TABLE CELLPADDING="3" BORDER="1" ALIGN="CENTER"> <!–- Build table header, by selecting the name of each element in the first ROW. --> <TR><TH></TH> <xsl:for-each select="ROWSET/ROW[1]/*"> <TH><xsl:value-of select="name()" /></TH> </xsl:for-each> </TR> <!–- Apply template to build table rows --> <xsl:apply-templates select="ROWSET" /> </TABLE> </xsl:template> ... XSLT Stylesheet: table.xsl (continues) ... <xsl:template match="ROW"> <TR><TD><xsl:number /></TD> <!-– Select all elements in the ROW. Populate each TD with the corresponding text value of the element. Note: &#160; produces &nbsp; by Xalan --> <xsl:for-each select="*"> <TD><xsl:value-of select="." />&#160;</TD> </xsl:for-each> </TR> </xsl:template> </xsl:stylesheet> XML Document: acronyms.xml <?xml version="1.0"?> <ROWSET> <ROW> <ACRONYM>DOM</ACRONYM> <DESCRIPTION>Document Object Model</DESCRIPTION> </ROW> <ROW> <ACRONYM>JAXP</ACRONYM> <DESCRIPTION>Java AIP for XML Parsing</DESCRIPTION> </ROW> <ROW> <ACRONYM>SAX</ACRONYM> <DESCRIPTION>Simple API for XML</DESCRIPTION> </ROW> <ROW> <ACRONYM>TrAX</ACRONYM> <DESCRIPTION>Transformation API for XML</DESCRIPTION> </ROW> <ROW> <ACRONYM>XSLT</ACRONYM> <DESCRIPTION>XSL Transformation</DESCRIPTION> </ROW> </ROWSET> Transformation Result <TABLE ALIGN="CENTER" BORDER="1" CELLPADDING="3"> <TR> <TH></TH><TH>ACRONYM</TH><TH>DESCRIPTION</TH> </TR> <TR> <TD>1</TD><TD>DOM&nbsp;</TD><TD>Document Object Model&nbsp;</TD> </TR> <TR> <TD>2</TD><TD>JAXP&nbsp;</TD><TD>Java AIP for XML Parsing&nbsp;</TD> </TR> <TR> <TD>3</TD><TD>SAX&nbsp;</TD><TD>Simple API for XML&nbsp;</TD> </TR> <TR> <TD>4</TD><TD>TrAX&nbsp;</TD><TD>Transformation API for XML&nbsp;</TD> </TR> <TR> <TD>5</TD><TD>XSLT&nbsp;</TD><TD>XSL Transformation&nbsp;</TD> </TR> </TABLE> Transformation Result (continued).
Recommended publications
  • JAXB Release Documentation JAXB Release Documentation Table of Contents
    JAXB Release Documentation JAXB Release Documentation Table of Contents Overview .......................................................................................................................... 1 1. Documentation ....................................................................................................... 1 2. Software Licenses ................................................................................................... 1 3. Sample Apps .......................................................................................................... 2 3.1. Using the Runtime Binding Framework ............................................................ 2 Release Notes .................................................................................................................... 6 1. Java™ 2 Platform, Standard Edition (J2SE™) Requirements .......................................... 7 2. Identifying the JAR Files ......................................................................................... 7 3. Locating the Normative Binding Schema .................................................................... 7 4. Changelog ............................................................................................................. 7 4.1. Changes between 2.3.0.1 and 2.4.0 .................................................................. 7 4.2. Changes between 2.3.0 and 2.3.0.1 .................................................................. 7 4.3. Changes between 2.2.11 and 2.3.0 ..................................................................
    [Show full text]
  • Fun Factor: Coding with Xquery a Conversation with Jason Hunter by Ivan Pedruzzi, Senior Product Architect for Stylus Studio
    Fun Factor: Coding With XQuery A Conversation with Jason Hunter by Ivan Pedruzzi, Senior Product Architect for Stylus Studio Jason Hunter is the author of Java Servlet Programming and co-author of Java Enterprise Best Practices (both O'Reilly Media), an original contributor to Apache Tomcat, and a member of the expert groups responsible for Servlet, JSP, JAXP, and XQJ (XQuery API for Java) development. Jason is an Apache Member, and as Apache's representative to the Java Community Process Executive Committee he established a landmark agreement for open source Java. He co-created the open source JDOM library to enable optimized Java and XML integration. More recently, Jason's work has focused on XQuery technologies. In addition to helping on XQJ, he co-created BumbleBee, an XQuery test harness, and started XQuery.com, a popular XQuery development portal. Jason presently works as a Senior Engineer with Mark Logic, maker of Content Interaction Server, an XQuery-enabled database for content. Jason is interviewed by Ivan Pedruzzi, Senior Product Architect for Stylus Studio. Stylus Studio is the leading XML IDE for XML data integration, featuring advanced support for XQuery development, including XQuery editing, mapping, debugging and performance profiling. Ivan Pedruzzi: Hi, Jason. Thanks for taking the time to XQuery behind a J2EE server (I have a JSP tag library talk with The Stylus Scoop today. Most of our readers for this) but I’ve found it easier to simply put XQuery are familiar with your past work on Java Servlets; but directly on the web. What you do is put .xqy files on the could you tell us what was behind your more recent server that are XQuery scripts to produce XHTML interest and work in XQuery technologies? pages.
    [Show full text]
  • Xml Parsing with Dom4j
    University at Buffalo Hanifi Gunes Spring 2011 PhD Candidate Computer Science & Engineering CSE 586 - Distributed Systems hanifigu{at}buffalo{dot}edu xml parsing with dom4j In this tutorial we will talk about XML parsing with dom4j, an easy to use, open source library working with XML, XPath and XSLT on the Java platform. So let’s get started. ➀ Download and install eclipse for Java developers: http://www.eclipse.org Download the dom4j jar package: http://dom4j.sourceforge.net Download the jaxen jar package: http://jaxen.codehaus.org ➁ Run eclipse and locate your workspace directory if you are running it for the first time. Now, create a new Java Project, MyXMLReader, from File ➝ New ➝ Java Project. Notice that the project is created under the workspace directory {workspace_dir}/MyXMLReader. ➂ Right click on your project and select Build Path ➝ Add External Archives. Locate and add the dom4j jar archive from step 1 and repeat the same procedure to add the jaxen package to your build path. At that point, you should see these packages listed under Referenced Libraries as it is on the left snapshot. ➃ Now that, the project setup is done we can work with Yahoo! Weather. Visit http:// developer.yahoo.com/weather/ to get familiar with the XML response schema. First thing to observe is that you can query Yahoo Weather for a particular zip code using the following pattern http://weather.yahooapis.com/forecastrss?p=ZIPCODE. Try substituting your own zip code into the address pattern and then navigate to that address from your browser in order to inspect the XML response.
    [Show full text]
  • Major Open Source ILS Products
    Chapter 3 Major Open Source ILS Products t least four open source ILS products are available system, called Catalist, which was not compliant with the today: Koha, Evergreen, and OPALS. (see table looming Y2K issue. Rather than purchase a commercial A4). While there may be some additional products, system, HLT contracted with a consulting company named these four have emerged as the most widely implemented Katipo Communications to develop a new Web-based sys- and serve as good examples of the current state of the tem. They named this new system Koha, the Maori word art of the open source ILS. While each of these products for gift or donation, and released it as open source, allow- bears a great deal of similarity in approach, they also dif- ing libraries anywhere to use and help develop and sup- fer in features and functionality and in their appeal to port the software. The HLT libraries began using Koha on different types of libraries This section provides detailed January 1, 2000. information regarding each of these systems. A fairly quiet period followed the initial release of Koha, with a few individuals and libraries picking up on the system. No groundswell of interest resulted right away. The initial version of Koha was quite adequate for History and Background three libraries of HLT that together served a commu- Koha nity of about 30,000 residents with a collection of about 80,000 volumes. At that point, Koha did not have some Koha claims the status of being the first open source of the features considered mandatory for most libraries— November/December 2008 November/December library automation system.
    [Show full text]
  • XML Parsers - a Comparative Study with Respect to Adaptability
    XML Parsers - A comparative study with respect to adaptability Bachelor Degree Project in Information Technology Basic level 30 ECTS Spring term 2018 Johan Holm Mats Gustavsson Supervisor: Yacine Atif Examinator: Alan Said Abstract Data migration is common as information needs to be moved and transformed between services and applications. Performance in the context of speed is important and may have a crucial impact on the handling of data. Information can be sent in varying formats and XML is one of the more commonly used. The information that is sent can change in structure from time to time and these changes needs to be handled. The parsers’ ability to handle these changes are described as the property “adaptability”. The transformation of XML files is done with the use of parsing techniques. The parsing techniques have different approaches, for example event-based or memory-based. Each approach has its pros and cons. The aim of this study is to research how three different parsers handle parsing XML documents with varying structures in the context of performance. The chosen parsing techniques are SAX, DOM and VTD. SAX uses an event-based approach while DOM and VTD uses a memory-based. Implementation of the parsers have been made with the purpose to extract information from XML documents an adding it to an ArrayList. The results from this study show that the parsers differ in performance, where DOM overall is the slowest and SAX and VTD perform somewhat equal. Although there are differences in the performance between the parsers depending on what changes are made to the XML document.
    [Show full text]
  • XML and Related Technologies Certification Prep, Part 3: XML Processing Explore How to Parse and Validate XML Documents Plus How to Use Xquery
    XML and Related Technologies certification prep, Part 3: XML processing Explore how to parse and validate XML documents plus how to use XQuery Skill Level: Intermediate Mark Lorenz ([email protected]) Senior Application Architect Hatteras Software, Inc. 26 Sep 2006 Parsing and validation represent the core of XML. Knowing how to use these capabilities well is vital to the successful introduction of XML to your project. This tutorial on XML processing teaches you how to parse and validate XML files as well as use XQuery. It is the third tutorial in a series of five tutorials that you can use to help prepare for the IBM certification Test 142, XML and Related Technologies. Section 1. Before you start In this section, you'll find out what to expect from this tutorial and how to get the most out of it. About this series This series of five tutorials helps you prepare to take the IBM certification Test 142, XML and Related Technologies, to attain the IBM Certified Solution Developer - XML and Related Technologies certification. This certification identifies an intermediate-level developer who designs and implements applications that make use of XML and related technologies such as XML Schema, Extensible Stylesheet Language Transformation (XSLT), and XPath. This developer has a strong understanding of XML fundamentals; has knowledge of XML concepts and related technologies; understands how data relates to XML, in particular with issues associated with information modeling, XML processing, XML rendering, and Web XML processing © Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 38 developerWorks® ibm.com/developerWorks services; has a thorough knowledge of core XML-related World Wide Web Consortium (W3C) recommendations; and is familiar with well-known, best practices.
    [Show full text]
  • Candidate Resume
    Flat No-a/303, Dharti Park, Behind Shriniwas , Palghar Thane MH 401501 India P : +91 9321883949 E : [email protected] W : www.hawkcl.com Hawk ID # 33574 IT / System Analyst Residential Country : India Nationality : India Resume Title : System Analyst Notice Period : 1 Days EDUCATION Qualification Institute / College /University Year Country B E / B Tech JNTU 2007 India CAREER SUMMARY From Month/ To Month/ Position Employer Country Year Year System Analyst Reputed Company 07/2010 / Software Verus Solutions 10/2007 07/2010 Developer Private Ltd ADDITIONAL CERTIFICATE AND TECHNICAL QUALIFICATION Name Of The Course Course Date Valid Upto Name Of Organisation Current Salary Expected Salary (Monthly In USD): Not Mention (Monthly In USD): Not Mention Additional Skills : Professional Summary • Eight years of experience in design, development, deployment and maintenance of enterprise web applications in ERP, Utility and Marketing domains. • Expertise in Client/ Server and application development using Java, J2ee technologies. • Experienced in leading and mentoring teams with 3-5 members. • Strong knowledge on Object Oriented Programming. • Expertise in web application development using frameworks like Struts , Spring and Hibernate. • Excellent Knowledge of MVC Architecture. • Have worked on application servers like Jboss and Tomcat. • Have worked on build and deploy tools like Ant and Maven. • Have worked on continuous integration tools like Hudson (aka Jenkins). • Have worked on consuming the SOAP web services using Apache Axis API. • Good understanding of Rest Services (RestEasy). • Working knowledge on relational databases like Oracle 10g and Postgresql 8. • Pro-active, highly motivated, results oriented and leadership skills with great team ethics. Technical Expertise • Programming Languages : Java 5/6/7.
    [Show full text]
  • XML for Java Developers G22.3033-002 Course Roadmap
    XML for Java Developers G22.3033-002 Session 1 - Main Theme Markup Language Technologies (Part I) Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences 1 Course Roadmap Consider the Spectrum of Applications Architectures Distributed vs. Decentralized Apps + Thick vs. Thin Clients J2EE for eCommerce vs. J2EE/Web Services, JXTA, etc. Learn Specific XML/Java “Patterns” Used for Data/Content Presentation, Data Exchange, and Application Configuration Cover XML/Java Technologies According to their Use in the Various Phases of the Application Development Lifecycle (i.e., Discovery, Design, Development, Deployment, Administration) e.g., Modeling, Configuration Management, Processing, Rendering, Querying, Secure Messaging, etc. Develop XML Applications as Assemblies of Reusable XML- Based Services (Applications of XML + Java Applications) 2 1 Agenda XML Generics Course Logistics, Structure and Objectives History of Meta-Markup Languages XML Applications: Markup Languages XML Information Modeling Applications XML-Based Architectures XML and Java XML Development Tools Summary Class Project Readings Assignment #1a 3 Part I Introduction 4 2 XML Generics XML means eXtensible Markup Language XML expresses the structure of information (i.e., document content) separately from its presentation XSL style sheets are used to convert documents to a presentation format that can be processed by a target presentation device (e.g., HTML in the case of legacy browsers) Need a
    [Show full text]
  • Stylesheet Translations of SVG to VML
    Stylesheet Translations of SVG to VML A Master's Project presented to The Faculty of the Department of Computer Science San Jose State University In Partial Fulfillment of the Requirements for the Degree of Master of Science Julie Nabong Advisor: Dr. Chris Pollett May 2004 Abstract The most common graphics formats on the Web today are JPEG and GIF. In addition to these formats, two XML-based graphic types are available as open standards: SVG and VML. SVG and VML are vector graphic formats. These formats offer benefits such as fast Web download time, zoomable images, and searchable texts. Because these vector graphics are scalable, these images can be viewed in different screen sizes, such as PC displays and handheld devices. SVG and VML implementations are gaining popularity in Internet cartography and zoomable charts. SVG images can be viewed by downloading a plug-in; whereas, VML images are rendered in Microsoft's Internet Explorer browser versions 5.0 and higher. Although SVG may be considered a more mature format than VML, it is unlikely it will be supported natively by Microsoft anytime soon. In this master's project, SVG images will be transformed into VML images contained in an HTML document that can be viewed without a plug-in. SVG images will be manipulated through the Document Object Model API and transformed into VML images using JavaScript, XSLT, and XPath. JavaScript will play an important role in handling functionalities not present in XSLT. This project will address the issue of gradient discrepancies between the two formats, and try to get the speed of the translation as close to that of the plug-in based solution as possible.
    [Show full text]
  • XML: Looking at the Forest Instead of the Trees Guy Lapalme Professor Département D©Informatique Et De Recherche Opérationnelle Université De Montréal
    XML: Looking at the Forest Instead of the Trees Guy Lapalme Professor Département d©informatique et de recherche opérationnelle Université de Montréal C.P. 6128, Succ. Centre-Ville Montréal, Québec Canada H3C 3J7 [email protected] http://www.iro.umontreal.ca/~lapalme/ForestInsteadOfTheTrees/ Publication date April 14, 2019 XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/ XML: Looking at the Forest Instead of the Trees Guy Lapalme Professor Département d©informatique et de recherche opérationnelle Université de Montréal C.P. 6128, Succ. Centre-Ville Montréal, Québec Canada H3C 3J7 [email protected] http://www.iro.umontreal.ca/~lapalme/ForestInsteadOfTheTrees/ Publication date April 14, 2019 Abstract This tutorial gives a high-level overview of the main principles underlying some XML technologies: DTD, XML Schema, RELAX NG, Schematron, XPath, XSL stylesheets, Formatting Objects, DOM, SAX and StAX models of processing. They are presented from the point of view of the computer scientist, without the hype too often associated with them. We do not give a detailed description but we focus on the relations between the main ideas of XML and other computer language technologies. A single compact pretty-print example is used throughout the text to illustrate the processing of an XML structure with XML technologies or with Java programs. We also show how to create an XML document by programming in Java, in Ruby, in Python, in PHP, in E4X (Ecmascript for XML) and in Swift. The source code of the example XML ®les and the programs are available either at the companion web site of this document or by clicking on the ®le name within brackets at the start of the caption of each example.
    [Show full text]
  • JAVA XML Mock Test
    JJAAVVAA XXMMLL MMOOCCKK TTEESSTT http://www.tutorialspoint.com Copyright © tutorialspoint.com This section presents you various set of Mock Tests related to JAVA XML Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself. JJAAVVAA XXMMLL MMOOCCKK TTEESSTT IIII Q 1 - Which of the following method is used to read contents in SAX parsing? A - startDocument B - characters C - startElement D - endElement Q 2 - Which of the following is true about JDOM Parser? A - It is java optimized, it uses java collection like List and Arrays. B - It works with DOM and SAX APIs and combines the best of the two. C - Both of the above. D - None of the above. Q 3 - Which of the following is true about JDOM Parser? A - It is of low memory footprint. B - It is nearly as fast as SAX based parser. C - Both of the above. D - None of the above. Q 4 - Which component of JDOM Parser represents DOM tree? A - Document B - Element C - Attribute D - Text Q 5 - Which component of JDOM Parser represents XML Element? A - Document B - Element C - Attribute D - Text Q 6 - Which component of JDOM Parser represents XML attribute? A - Document B - Element C - Attribute D - Text Q 7 - Which component of JDOM Parser represents text of XML tag? A - Document B - Element C - Attribute D - Text Q 8 - Which component of JDOM Parser represents comments in a XML document? A - Comment B - Element C - Attribute D - Text Q 9 - Which
    [Show full text]
  • Spreadsheet-Based Complex Data Transformation
    Spreadsheet-based complex data transformation Hung Thanh Vu Dissertation submitted in fulfilment of the requirements for the degree of Doctor of Philosophy School of Computer Science and Engineering University of New South Wales Sydney, NSW 2052, Australia March 2011 Supervisor: Prof. Boualem Benatallah i Acknowledgements I am very grateful to Professor Boualem for his exceptional unconditional support and limitless patience. He was the first person who taught me how to do research; how to write and present a complex research problem. He has always been there for me when I have any difficulties in research. He is one of the best supervisors I have ever worked with. Without his support, this thesis would never be completed. My sincere thanks go to Dr Regis Saint-Paul for his fruitful collaborations and providing me invaluable research skills. I also wish to express my gratitude to the members of the SOC group, who spent a lot of time discussing with me on the research issues and giving me helpful advice. I would like to thank Dr Paolo Papotti for insightful discussions on data exchange as well as mapping tools Clio, Clip, and +Spicy; Assisstant Professor Christopher Scaffidi for answering my questions on Topes; Associate Professor Wang-Chiew Tan and Dr Bogdan Alexe for helping me understand STBenchmark; Dr Wei Wang for helpful discussions on similarity join and its related algorithms; and some members of XQuery WG and XSLT WG including Daniela Florescu, Jerome Simeon, and Michael Kay for giving me advice on the expressiveness and new updates of XSLT and XQuery. Last but not least, I am forever in debt to my parents.
    [Show full text]