Application Development with XML and Java

Total Page:16

File Type:pdf, Size:1020Kb

Application Development with XML and Java WritingWriting XMLXML withwith JavaJava • You don’t need to know any special APIs like DOM or SAX or JDOM. All you have to know is how to System.out.println(). If you want to store your XML document in a file, you can use the FileOutputStream class ApplicationApplication DevelopmentDevelopment instead. withwith XMLXML andand JavaJava • We are going to develop a program that writes Fibonacci numbers into an XML document. • the principles of XML we will use here Lecture 3 will be much more broadly applicable Writing XML with Java to other, more complex systems. Introduction to Parsing • The key idea is that data arrives from some source, is encoded in XML, and is then output. Where the input comes from, whether an algorithm, a file, a network socket, user input, or some other source, really doesn’t concern us here. Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java FibonacciFibonacci NumbersNumbers FibonacciFibonacci NumbersNumbers • As far as we know, the Fibonacci series • It’s very easy to calculate the was first discovered by Leonardo of Pisa Fibonacci sequence by computer. A around 1200 C.E. Leonardo “How many simple for loop will do. For example, pairs of rabbits are born in one year from this code fragment prints the first 40 one pair?” To solve his problem, Fibonacci numbers: Leonardo estimated that rabbits have a int low = 1; one month gestation period, and can first int high = 1; mate at the age of one month, so that for (int i = 1; i <= 40; i++) { each female rabbit has its first litter at two System.out.println(low); int temp = high; months. He made the simplifying high = high+low; assumption that each litter consisted of low = temp; } exactly one male and one female. • However, the Fibonacci numbers do • The rabbits aren’t so important, but the grow very large very quickly, and math is. Each integer in the series is exceed the bounds of an int shortly formed by the sum of the two previous before the fiftieth generation. integers. The first two integers in the Consequently, it’s better to use the series are 1 and 1.The Fibonacci series turns up in some very unexpected places java.math.BigInteger class instead including decimal expansions of π. Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java FibonacciFibonacci NumbersNumbers ProducingProducing XMLXML documentdocument import java.math.BigInteger; <?xml version="1.0"?> public class FibonacciNumbers <Fibonacci_Numbers> { <fibonacci>1</fibonacci> public static void main(String[] <fibonacci>1</fibonacci> args) { <fibonacci>2</fibonacci> BigInteger low = BigInteger.ONE; <fibonacci>3</fibonacci> BigInteger high = BigInteger.ONE; <fibonacci>5</fibonacci> for (int i = 1; i <= 10; i++) <fibonacci>8</fibonacci> { <fibonacci>13</fibonacci> System.out.println(low); <fibonacci>21</fibonacci> BigInteger temp = high; <fibonacci>34</fibonacci> high = high.add(low); <fibonacci>55</fibonacci> low = temp; </Fibonacci_Numbers> } } } • To produce this, just add string • When run, this program produces the first ten Fibonacci numbers: literals for the <fibonacci> and </fibonacci> tags inside the print java FibonacciNumbers statements, as well as a few extra print 1 1 2 3 5 8 13 21 34 55 statements to produce the XML declaration and the root element start- and end-tags. XML documents are just text, and you can output them any way you’d output any other text document. Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java JavaJava ExampleExample XMLXML--RPCRPC import java.math.BigInteger; • An XML-RPC request is just an XML public class FibonacciXML document sent over a network socket. { • We will write a very simple XML-RPC public static void main(String[] args) { client for a particular service. BigInteger low = BigInteger.ONE; – We will just ask the user for the data to BigInteger high = BigInteger.ONE; send to the server, wrap it up in some XML, and write it onto a URL object System.out.println("<?xml pointing at the server. version=\"1.0\"?>"); System.out.println("<Fibonacci_Number – The response will come back in XML as s>"); well. Since we haven’t yet learned how to read XML documents, Response will be for (int i = 0; i < 10; i++) { a text to System.out. Later we’ll pay more System.out.print(" <fibonacci>"); attention to the response, and provide a System.out.print(low); nicer user interface. System.out.println("</fibonacci>"); • The specific XML-RPC service we’re BigInteger temp = high; going to talk to is a Fibonacci high = high.add(low); generator. The request passes an int to low = temp; the server. The server responds with } the value of that Fibonacci number. System.out.println("</Fibonacci_Numbe rs>"); } } Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java ExampleExample ExampleExample • This request document asks for the • The client needs to read an integer input by value of the 23rd Fibonacci number: the user, wrap that integer in the XML-RPC <?xml version="1.0"?> envelope, then send that document to the <methodCall> server using HTTP POST. <methodName>calculateFibonacci • In Java the simplest way to post a document </methodName> is through the <params> java.net.HttpURLConnection class. You <param> get an instance of this class by calling a URL <value><int>23</int></value> object’s openConnection() method, and </param> then casting the resulting URLConnection </params> HttpURLConnection </methodCall> object to . • Once you have an HttpURLConnection, And here’s the response: you set its protected doOutput field to true <?xml version="1.0"?> using the setDoOutput() method and its <methodResponse> <params> request method to POST using the <param> setRequestMethod() method. <value><double>28657</double>< • Then you grab hold of an output stream /value> using getOutputStream() and proceed to </param> </params> write your request body on that. </methodResponse> Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java XMLXML ParsersParsers WhatWhat isis anan XMLXML ParserParser What is a Parser? The parser is a software library (a Java class) that reads the XML document and checks it Defining Parser Responsibilities for well-formedness. Client applications use Evaluating Parsers method calls defined in the parser API to receive or request information the parser Validation retrieves from the XML document. – The parser shields the client application from Validating v. Nonvalidating Parsers all the complex and not particularly relevant XML Interfaces details of XML including: – Transcoding the document to Unicode Object v. Tree Based Interfaces – Assembling the different parts of a document Interface Standards: DOM, SAX divided into multiple entities. – Resolving character references Java XML Parsers – Understanding CDATA sections – Checking hundreds of well-formedness constraints – Maintaining a list of the namespaces in-scope on each element. – Validating the document against its DTD or schema – Associating unparsed entities with particular URLs and notations – Assigning types to attributes Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java TheThe BigBig PicturePicture Java Application XML XML Or Parser Document Servlet WhatWhat isis anan XMLXML Parser?Parser? An XML Parser enables your Java application or Servlet to more easily access XML Data. Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java DefiningDefining ParserParser ThreeThree WhyWhy useuse anan XMLXML Parser?Parser? ResponsibilitiesResponsibilities 1. Retrieve and Read an XML If your application is going to use document XML, you could write your own For example, the file may reside on the local file system or on another web site. parser. The parser takes care of all the But, it makes more sense to use a necessary network connections and/or file connections. pre-built XML parser. This helps simplify your work, as you This enables you to do build your do not need to worry about creating application much more quickly. your own network connections. 2. Ensure that the document adheres to specific standards. Parser Evaluation Does the document match the DTD? When evaluating which XML Is the document well-formed? Parser to use, there are two very 3. Make the document contents important questions to ask: available to your application. Is the Parser validating or non- The parser will parse the XML validating? document, and make this data available to your application. What interface does the parser provide to the XML document? Kosmas Kosmopoulos Application development with XML and Java Kosmas Kosmopoulos Application development with XML and Java XMLXML ValidationValidation PerformancePerformance andand MemoryMemory Validating Parser Questions: Which parser will have better performance? a parser that verifies that the XML Which parser will take up less memory? document adheres to the DTD. Validating parsers: Non-Validating Parser more useful a parser that does not check the slower DTD. take up more memory Lots of parsers provide an option Non-validating parsers: less useful to turn validation on or off. faster take up less memory Therefore, when high performance and low-memory are the most important criteria,
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 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]
  • 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]
  • 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]
  • High Performance XML Data Retrieval
    High Performance XML Data Retrieval Mark V. Scardina Jinyu Wang Group Product Manager & XML Evangelist Senior Product Manager Oracle Corporation Oracle Corporation Agenda y Why XPath for Data Retrieval? y Current XML Data Retrieval Strategies and Issues y High Performance XPath Requirements y Design of Extractor for XPath y Extractor Use Cases Why XPath for Data Retrieval? y W3C Standard for XML Document Navigation since 2001 y Support for XML Schema Data Types in 2.0 y Support for Functions and Operators in 2.0 y Underlies XSLT, XQuery, DOM, XForms, XPointer Current Standards-based Data Retrieval Strategies y Document Object Model (DOM) Parsing y Simple API for XML Parsing (SAX) y Java API for XML Parsing (JAXP) y Streaming API for XML Parsing (StAX) Data Retrieval Using DOM Parsing y Advantages – Dynamic random access to entire document – Supports XPath 1.0 y Disadvantages – DOM In-memory footprint up to 10x doc size – No planned support for XPath 2.0 – Redundant node traversals for multiple XPaths DOM-based XPath Data Retrieval A 1 1 2 2 1 /A/B/C 2 /A/B/C/D B F B 1 2 E C C 2 F D Data Retrieval using SAX/StAX Parsing y Advantages – Stream-based processing for managed memory – Broadcast events for multicasting (SAX) – Pull parsing model for ease of programming and control (StAX) y Disadvantages – No maintenance of hierarchical structure – No XPath Support either 1.0 or 2.0 High Performance Requirements y Retrieve XML data with managed memory resources y Support for documents of all sizes y Handle multiple XPaths with minimum node traversals
    [Show full text]
  • Java Parse Xml Document
    Java Parse Xml Document incontrovertibilityPained Swen smarts limites no kindly.grantee Curled invoiced Georges uncommon devocalises after Zollie laughably. mithridatizing snatchily, quite hypotactic. Sicklied Marshall smudges his Once we print and added to access the de facto language that java xml In java dom available and how to apply to have treated as deserializing our web site may sponsor a parser that are frequently by. Processing a large XML file using a SAX parser still requires constant fight But, still the complete hand, parsing complex XML really becomes a mess. Parsing Reading XML file in Java GitHub. The dom4j API download includes a color for parsing XML documents. Thanks for voice clear explanation. JavaxxmlparsersDocumentBuilderparse java code Codota. StringReaderxmlRecords Document doc dbparseis NodeList nodes doc. The DOM has different bindings in different languages. Why you how did you need it, pearson collects your document object consumes a dom. This document describes the Java API for XML Parsing Version 10. For parsing the XML use XPath and for it text file based approach use Java Property Riles Hope that helps a bit Cheers MRB. The first corn is used for documents with possible specific target namespace, the brew for documents without a namespace. Xml allows us learn and written here we create a real time consumption and share data binding, into a good for parsing json. Fast Infoset techniques while man with XML content in Java. Parsing XML using DOM4J Java API BeginnersBookcom. Continued use for building blocks the ui thread however, string in an event in document can update your app to handle to.
    [Show full text]
  • Java API for XML Processing
    4 Java API for XML Processing THE Java API for XML Processing (JAXP) is for processing XML data using applications written in the Java programming language. JAXP leverages the parser standards SAX (Simple API for XML Parsing) and DOM (Document Object Model) so that you can choose to parse your data as a stream of events or to build an object representation of it. JAXP also supports the XSLT (XML Stylesheet Language Transformations) standard, giving you control over the pre- sentation of the data and enabling you to convert the data to other XML docu- ments or to other formats, such as HTML. JAXP also provides namespace support, allowing you to work with DTDs that might otherwise have naming conflicts. Designed to be flexible, JAXP allows you to use any XML-compliant parser from within your application. It does this with what is called a “pluggability layer”, which allows you to plug in an implementation of the SAX or DOM APIs. The pluggability layer also allows you to plug in an XSL processor, letting you control how your XML data is displayed. The JAXP APIs The main JAXP APIs are defined in the javax.xml.parsers package. That package contains two vendor-neutral factory classes: SAXParserFactory and 115 116 JAVA API FOR XML PROCESSING DocumentBuilderFactory that give you a SAXParser and a DocumentBuilder, respectively. The DocumentBuilder, in turn, creates DOM-compliant Document object. The factory APIs give you the ability to plug in an XML implementation offered by another vendor without changing your source code. The implementation you get depends on the setting of the javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory system properties.
    [Show full text]
  • Testing XSLT
    Testing XSLT Tony Graham Menteith Consulting Ltd 13 Kelly's Bay Beach Skerries, Co Dublin Ireland [email protected] http://www.menteithconsulting.com Version 1.3 – XML Prague 2009 – 21 March 2009 © 2007–2009 Menteith Consulting Ltd Testing XSLT Testing XSLT Introductions 5 XSLT 5 Testing Source 5 Testing Result 6 Testing Source–Result 6 Testing the Stylesheet 7 Problem Scenarios 16 Errors That Aren't Caught By Other Tests 17 Resources 18 © 2007–2009 Menteith Consulting Ltd 3 Menteith Consulting 4 © 2007–2009 Menteith Consulting Ltd Testing XSLT Testing XSLT 1 • Introduction • Testing Source • Testing Result • Testing Source–Result • Testing the Stylesheet Introductions Who am I? 2 • Tony Graham of Menteith Consulting • XML and XSL/XSLT consultant • Based in Dublin, Ireland • Clients in Ireland, USA, France, UK • Doing XSLT since 1998 • Working with both XSLT 1.0 and XSLT 2.0 XSLT 3 Transforms source tree into result tree by associating patterns with templates XSLT / Stylesheet Source Result Tree Tree / / XSLT Processor © 2007–2009 Menteith Consulting Ltd 5 Menteith Consulting 4 Testing Source • Good if you can do it • May be well-formed or very loose schema • May be constraints that aren't easily checked 5 Testing Result • Good if you can do it • May be well-formed or very loose schema • May be constraints that aren't easily checked, e.g., XSL FO • If HTML, use HTML testing tools, e.g., WebTest • Harder to verify text output 6 Testing Source–Result 6 © 2007–2009 Menteith Consulting Ltd Testing XSLT XSLV Static Validation Tool
    [Show full text]
  • JSR-000206 Java™API for XML Processing (“Specification”)
    JSR-000206 Java™API for XML Processing (“Specification”) Version: 1.5 July 16, 2013 Maintenance Lead: Joe Wang Oracle Corporation Feedback: Please send comments to [email protected] Oracle Corporation 500 Oracle Parkway Redwood Shores, CA 94065 USA ORACLE AMERICA, INC. IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE. Specification: <JSR-206 Java™API for XML Processing ("Specification") Version: 1.5 Status: Final Release Specification Lead: Oracle America, Inc. ("Specification Lead") Release: March 2013 Copyright 2013 Oracle America, Inc. All rights reserved. LIMITED LICENSE GRANTS 1. License for Evaluation Purposes. Specification Lead hereby grants you a fully-paid, non-exclusive, non- transferable, worldwide, limited license (without the right to sublicense), under Specification Lead's applicable intellectual property rights to view, download, use and reproduce the Specification only for the purpose of internal evaluation. This includes (i) developing applications intended to run on an implementation of the Specification, provided that such applications do not themselves implement any portion(s) of the Specification, and (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Specification.
    [Show full text]
  • A Performance Based Comparative Study of Different Apis Used for Reading and Writing XML Files
    A Performance Based Comparative Study of Different APIs Used for Reading and Writing XML Files A Thesis submitted to the Graduate School at the University of Cincinnati In Partial Fulfillment of the requirements for the Degree of MASTER OF SCIENCE In the School of Electronics and Computing Systems of the College of Engineering and Applied Sciences By Neha Gujarathi Bachelor of Engineering (B. E.), 2009 University of Pune, India Committee Chair: Dr. Carla Purdy ABSTRACT Recently, XML (eXtensible Markup Language) files have become of great importance in business enterprises. Information in the XML files can be easily shared across the web. Thus, extracting data from XML documents and creating XML documents become important topics of discussion. There are many APIs (Application Program Interfaces) available which can perform these operations. For beginners in XML processing, selecting an API for a specific project is a difficult task. In this thesis we compare various APIs that are capable of extracting data and / or creating XML files. The comparison is done based on the performance time for different types of inputs which form different cases. The codes for all the different cases are implemented. Two different systems, one with Windows 7 OS and another with Mac OS are used to perform all the experiments. Using the results found we propose a suitable API for a given condition. In addition to the performance, programming ease for these APIs is taken into consideration as another aspect for comparison. To compare the programming ease, aspects such as number of lines of code, complexity of the code and complexity of understanding the coding for the particular API are considered.
    [Show full text]