Java and XML. XML documents consist of Elements. Each element will contains other elements and will have Attributes. For example:

Size: px
Start display at page:

Download "Java and XML. XML documents consist of Elements. Each element will contains other elements and will have Attributes. For example:"

Transcription

1 Java and XML XML Documents An XML document is a way to represent structured information in a neutral format. The purpose of XML documents is to provide a way to represent data in a vendor and software neutral way and to provide a way to validate the data. XML documents consist of Elements. Each element will contains other elements and will have Attributes. For example: <?xml version="1.0" encoding="utf-8"?> <Students> <Student id="1234"> <FirstName>Joe</FirstName> <LastName>Smith</LastName> <Street>334 North</Street> <City>Fullerton</City> <Units>44</Units> <Student id="5678"> <FirstName>Sara</FirstName> <LastName>Williams</LastName> <Street>787 South</Street> <City>Brea</City> <Units>9</Units> </Students> In this case the root Element is named <Students> which contains a set of <Student> elements, each of which contains a number of smaller elements. The Student elements have an ID attribute. XML is case sensitive. XML Schema A simple XML file can represent structured data but by itself does not have any validation methods. That is, there are no constraints on the data that can be checked. When a block of XML data is sent to a program the validity of the data cannot be checked. This is why another element to XML files are schema. An XML schema is an XML file which contains information about the structure of the main file. An XML file can be sent with a schema and the schema can be used to validate the main file. For example, suppose we modified the Students XML file: <?xml version="1.0" encoding="utf-8"?> <Students xmlns=" xmlns:xsi=" xsi:schemalocation=" studentschema.xsd"> <Student id="1234"> <FirstName>Joe</FirstName> <LastName>Smith</LastName> <Street>334 North</Street> <City>Fullerton</City> <Units>44</Units> <Student id="5678"> <FirstName>Sara</FirstName> <LastName>Williams</LastName>

2 <Street>787 South</Street> <City>Brea</City> <Units>9</Units> </Students> In this case we have added some namespace and schema location information to the root tag. The file named studentschema.xsd would be placed in the same workspace as the XML file and can be used to validate the file. The Schema file would look like: <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeformdefault="unqualified" targetnamespace=" elementformdefault="qualified" xmlns:xs=" <xs:element name="students"> <xs:complextype> <xs:sequence> <xs:element name="student" maxoccurs="unbounded" minoccurs="1"> <xs:complextype> <xs:sequence> <xs:element type="xs:string" name="firstname" /> <xs:element type="xs:string" name="lastname" /> <xs:element type="xs:string" name="street" /> <xs:element type="xs:string" name="city" /> <xs:element type="xs:string" name="state" /> <xs:element type="xs:string" name="zip" /> <xs:element type="xs:int" name="units" /> </xs:sequence> <xs:attribute type="xs:short" name="id" use="required" /> </xs:complextype> </xs:element> </xs:sequence> </xs:complextype> </xs:element> </xs:schema> Notice that the schema file is just another XML file which contains a set of schema information which can be used to validate the original file. Names spaces can refer to online resources that define custom types, but the standards for XSD files normally suffice. In this case, the schema file contains a definition of the Students element as a complextype which contains a sequence of Student elements (each of which is also a complex type). SAX and DOM There are two ways to parse an XML file using the standard libraries. These are by using the SAX parser and using the DOM parser. The main difference is how the data is read and parsed. When parsing an XML element the parsing Java program must read an entire Element at once. That is, a Student element may contains a number of enclosed elements. When the program reaches the end of an element it can then deal with the element. A SAX parser reads an XML file from start to finish and uses callback functions to handle the XML file. The callback functions are startelement() and endelement(). SAX parsers are good for very large XML files. A DOM parser reads the entire XML file into memory and creates an in-memory Model of the xml file. This model consists of viewing the XML file as a series of Nodes. Each Node consists of an Element Node, a Text Node, and other such elements. The XML file is parsed into various collections which can be accessed by the programmer. DOM parsers are good for smaller XML files.

3 Using the DOM Parser The DOM Parser requires the following import libraries: import javax.xml.parsers.documentbuilder; import javax.xml.parsers.documentbuilderfactory; import javax.xml.parsers.parserconfigurationexception; import org.w3c.dom.document; import org.w3c.dom.element; import org.w3c.dom.node; import org.w3c.dom.nodelist; import org.xml.sax.saxexception; To use a DOM parser your program must complete the following steps: 1. Create a Document Builder Factory object 2. Use the Document Builder Factory object to create a Document Builder 3. Use the Builder to parse an XML file and return a Document object. Once your program has a Document object you can retrieve elements from the object. When retrieving elements you will retrieve objects called Nodes. A Node can be one of a set of elements in the document. These include Element Nodes, Text Nodes, etc. When you get a node you must determine what type of node it is before working with it. Some of the useful methods in the Document object are: getelementsbytagname( ) which returns a NodeList. This is a list of Nodes which your program can parse through. When you get a Node object you can then call the method getchildnodes() to return a list of all nodes contained in the node. Sample Look at the following sample XML file: <?xml version="1.0" encoding="utf-8"?> <Students> <Student id="1234"> <FirstName>Joe</FirstName> <LastName>Smith</LastName> <Street>334 North</Street> <City>Fullerton</City> <Units>44</Units> <Student id="5678"> <FirstName>Sara</FirstName> <LastName>Williams</LastName> <Street>787 South</Street> <City>Brea</City> <Units>9</Units> </Students>

4 Note the structure of this file. It contains a root element named <Students> which contains one or more elements named <Student>. Each of the <Student> elements contains a list of Elements. Also, the <Student> element has an attribute id. In order to read and parse this XML file we must: 1. Create a Document object that represents the file. 2. Retrieve a list of all <Student> elements. 3. Retrieve the id attribute from each element. 4. Get the list of child nodes from each <Student> element. 5. Read through these child nodes and retrieve the element name and the element values. The following Java program performs these tasks: import java.io.file; import java.io.ioexception; import java.util.arraylist; import javax.xml.parsers.documentbuilder; import javax.xml.parsers.documentbuilderfactory; import javax.xml.parsers.parserconfigurationexception; import org.w3c.dom.document; import org.w3c.dom.element; import org.w3c.dom.node; import org.w3c.dom.nodelist; import org.xml.sax.saxexception; public class MainClassDOM { public static void main(string[] args) { // TODO Auto-generated method stub Document doc = getdocument("students.xml"); ArrayList<Student> studentlist = getstudents(doc); printstudents(studentlist); public static void printstudents(arraylist<student> studentlist) { for (Student temp : studentlist) { System.out.printf("Student data is %s, %s, %s, %s, %s, %s %d\n", temp.getfirstname(), temp.getlastname(), temp.getstreet(), temp.getcity(), temp.getstate(), temp.getzip(), temp.getunits()); public static Document getdocument(string filename) { try { DocumentBuilderFactory dfact = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = dfact.newdocumentbuilder(); File fn = new File(filename); return builder.parse(fn); catch (ParserConfigurationException e) { catch (SAXException e) { catch (IOException e) {

5 return null; public static ArrayList<Student> getstudents(document doc) { // create a student array list ArrayList<Student> studentlist = new ArrayList<Student>(); // read through the xml file and retrieve Nodes NodeList nlist = doc.getelementsbytagname("student"); for (int i = 0; i < nlist.getlength(); i++) { Node n = nlist.item(i); // get ID Element element = (Element)n; String id = element.getattribute("id"); // create a student object Student st = new Student(id); // get child nodes NodeList slist = n.getchildnodes(); for (int j = 0; j < slist.getlength(); j++) { Node selement = slist.item(j); if (selement.getnodetype() == Node.ELEMENT_NODE) { String textval = selement.gettextcontent(); if (selement.getnodename().equals("firstname")) st.setfirstname(textval); if (selement.getnodename().equals("lastname")) st.setlastname(textval); if (selement.getnodename().equals("street")) st.setstreet(textval); if (selement.getnodename().equals("city")) st.setcity(textval); if (selement.getnodename().equals("state")) st.setstate(textval); if (selement.getnodename().equals("zip")) st.setzip(textval); if( selement.getnodename().equals("units")) st.setunits(textval); studentlist.add(st); return studentlist; This Java program creates Student objects and stores them in an ArrayList. The Student class looks like: public class Student { private String id; private String firstname; private String lastname; private String street; private String city; private String state; private String zip; private int units;

6 public int getunits() { return units; public void setunits(int units) { this.units = units; public void setunits(string units) { try { this.units = Integer.valueOf(units); catch (NumberFormatException e) { this.units = 0; public Student(String idval){id=idval; public String getcity() { return city; public void setcity(string city) { this.city = city; public String getfirstname() { return firstname; public void setfirstname(string firstname) { this.firstname = firstname; public String getlastname() { return lastname; public void setlastname(string lastname) { this.lastname = lastname; public String getstreet() { return street; public void setstreet(string street) { this.street = street; public String getstate() { return state; public void setstate(string state) { this.state = state; public String getzip() { return zip; public void setzip(string zip) { this.zip = zip; public String getid() { return id; In the main() method of our program the following three things are done: public static void main(string[] args) { // TODO Auto-generated method stub Document doc = getdocument("students.xml"); ArrayList<Student> studentlist = getstudents(doc); printstudents(studentlist);

7 A document object is created by the getdocument() method. An ArrayList of students is created by the getstudents() method, and the entire list of students is printed with the printstudents() method. The getdocument() method is passed the name of the XML file and it is fairly simple: public static Document getdocument(string filename) { try { DocumentBuilderFactory dfact = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = dfact.newdocumentbuilder(); File fn = new File(filename); return builder.parse(fn); catch (ParserConfigurationException e) { catch (SAXException e) { catch (IOException e) { return null; A document object is created after the dfact object is created from the DocumentBuilderFactory, which is then used to create the builder object which is then used to parse the xml file and return a Document object. The second method creates an array of students and then reads through the XML document for each element: public static ArrayList<Student> getstudents(document doc) { // create a student array list ArrayList<Student> studentlist = new ArrayList<Student>(); // read through the xml file and retrieve Nodes NodeList nlist = doc.getelementsbytagname("student"); for (int i = 0; i < nlist.getlength(); i++) { Node n = nlist.item(i); // get ID Element element = (Element)n; String id = element.getattribute("id"); // create a student object Student st = new Student(id); // get child nodes NodeList slist = n.getchildnodes(); for (int j = 0; j < slist.getlength(); j++) { Node selement = slist.item(j); if (selement.getnodetype() == Node.ELEMENT_NODE) { String textval = selement.gettextcontent(); if (selement.getnodename().equals("firstname")) st.setfirstname(textval); if (selement.getnodename().equals("lastname")) st.setlastname(textval); if (selement.getnodename().equals("street")) st.setstreet(textval); if (selement.getnodename().equals("city")) st.setcity(textval); if (selement.getnodename().equals("state")) st.setstate(textval);

8 if (selement.getnodename().equals("zip")) st.setzip(textval); if( selement.getnodename().equals("units")) st.setunits(textval); studentlist.add(st); return studentlist; First, a list of <Student> elements is retrieved with: NodeList nlist = doc.getelementsbytagname("student"); This returns a list of Nodes in the nlist object. Next, each item in this list is retrieved in a loop with: for (int i = 0; i < nlist.getlength(); i++) { Node n = nlist.item(i); // get ID Element element = (Element)n; String id = element.getattribute("id"); Notice how the length of the nodelist is retrieved withi getlength() and how the node object is retrieved with nlist.item(i). The Node object is then recast into an Element object because you must work with elements in order to get Attributes. Element element = (Element)n; String id = element.getattribute("id"); Once we have retrieved the ID attribute value we can create a student object (since the id value is the constructor). // create a student object Student st = new Student(id); At this point we have a <Student> node which contains all the elements for the student. Each of these is also a node which we want to use to retrieve the node value. This is done with: // get child nodes NodeList slist = n.getchildnodes(); for (int j = 0; j < slist.getlength(); j++) { Node selement = slist.item(j); Notice that the n refers to one of the <Student> nodes previously retrieved. The getchildnodes() method can be called on a particular node and, if the node has any child elements, they will be returned. We next want to make sure that what we are retrieving as a child node is actually an element. This is important because there are a number of other nodes and we only want to get Element nodes. if (selement.getnodetype() == Node.ELEMENT_NODE) { String textval = selement.gettextcontent();

9 In this example, if the retrieved node is an Element Node we retrieve the text Content (the values inside the XML element). We then read the element name and place the data into the student object. After figuring out which element we have retrieved we assign the newly created student to the ArrayList: studentlist.add(st);

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML Introduction Syntax and Usage Databases Java Tutorial November 5, 2008 Introduction Syntax and Usage Databases Java Tutorial Outline 1 Introduction 2 Syntax and Usage Syntax Well Formed and Valid Displaying

More information

HIBERNATE - ONE-TO-ONE MAPPINGS

HIBERNATE - ONE-TO-ONE MAPPINGS HIBERNATE - ONE-TO-ONE MAPPINGS http://www.tutorialspoint.com/hibernate/hibernate_one_to_one_mapping.htm Copyright tutorialspoint.com A one-to-one association is similar to many-to-one association with

More information

HIBERNATE - COMPONENT MAPPINGS

HIBERNATE - COMPONENT MAPPINGS HIBERNATE - COMPONENT MAPPINGS http://www.tutorialspoint.com/hibernate/hibernate_component_mappings.htm Copyright tutorialspoint.com A Component mapping is a mapping for a class having a reference to another

More information

XML. Technical Talk. by Svetlana Slavova. CMPT 842, Feb

XML. Technical Talk. by Svetlana Slavova. CMPT 842, Feb XML Technical Talk by Svetlana Slavova 1 Outline Introduction to XML XML vs. Serialization Curious facts, advantages & weaknesses XML syntax Parsing XML Example References 2 Introduction to XML (I) XML

More information

HIBERNATE - MANY-TO-ONE MAPPINGS

HIBERNATE - MANY-TO-ONE MAPPINGS HIBERNATE - MANY-TO-ONE MAPPINGS http://www.tutorialspoint.com/hibernate/hibernate_many_to_one_mapping.htm Copyright tutorialspoint.com A many-to-one association is the most common kind of association

More information

Web architectures Laurea Specialistica in Informatica Università di Trento. DOM architecture

Web architectures Laurea Specialistica in Informatica Università di Trento. DOM architecture DOM architecture DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setvalidating(true); // optional default is non-validating DocumentBuilder db = dbf.newdocumentbuilder(); Document

More information

CSC System Development with Java Working with XML

CSC System Development with Java Working with XML CSC 308 2.0 System Development with Java Working with XML Department of Statistics and Computer Science What is XML XML stands for extensible Markup Language is designed to transport and store data XML

More information

SDMX self-learning package No. 6 Student book. XML Based Technologies Used in SDMX

SDMX self-learning package No. 6 Student book. XML Based Technologies Used in SDMX No. 6 Student book XML Based Technologies Used in SDMX Produced by Eurostat, Directorate B: Statistical Methodologies and Tools Unit B-5: Statistical Information Technologies Last update of content May

More information

XML extensible Markup Language

XML extensible Markup Language extensible Markup Language Eshcar Hillel Sources: http://www.w3schools.com http://java.sun.com/webservices/jaxp/ learning/tutorial/index.html Tutorial Outline What is? syntax rules Schema Document Object

More information

Software Engineering Methods, XML extensible Markup Language. Tutorial Outline. An Example File: Note.xml XML 1

Software Engineering Methods, XML extensible Markup Language. Tutorial Outline. An Example File: Note.xml XML 1 extensible Markup Language Eshcar Hillel Sources: http://www.w3schools.com http://java.sun.com/webservices/jaxp/ learning/tutorial/index.html Tutorial Outline What is? syntax rules Schema Document Object

More information

languages for describing grammar and vocabularies of other languages element: data surrounded by markup that describes it

languages for describing grammar and vocabularies of other languages element: data surrounded by markup that describes it XML and friends history/background GML (1969) SGML (1986) HTML (1992) World Wide Web Consortium (W3C) (1994) XML (1998) core language vocabularies, namespaces: XHTML, RSS, Atom, SVG, MathML, Schema, validation:

More information

Oracle Hospitality OPERA Exchange Interface Profile Lookup Vendor Specification. May 2018

Oracle Hospitality OPERA Exchange Interface Profile Lookup Vendor Specification. May 2018 Oracle Hospitality OPERA Exchange Interface Profile Lookup Vendor Specification May 2018 Copyright 2004, 2018, Oracle and/or its affiliates. All rights reserved. This software and related documentation

More information

JDeveloper. Read Lotus Notes Data via URL Part 2

JDeveloper. Read Lotus Notes Data via URL Part 2 JDeveloper Read Lotus Notes Data via URL Part 2 Introduction: Read App Data from Lotus Notes Database into Java Server Faces Page on JDeveloper, running on Weblogic Server Use Existing Code HTTPCSVDataJavaAgent

More information

Class Relationships. Lecture 18. Based on Slides of Dr. Norazah Yusof

Class Relationships. Lecture 18. Based on Slides of Dr. Norazah Yusof Class Relationships Lecture 18 Based on Slides of Dr. Norazah Yusof 1 Relationships among Classes Association Aggregation Composition Inheritance 2 Association Association represents a general binary relationship

More information

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!   We offer free update service for one year PASS4TEST IT Certification Guaranteed, The Easy Way! \ http://www.pass4test.com We offer free update service for one year Exam : I10-002 Title : XML Master: Professional V2 Vendors : XML Master Version

More information

XPath Basics. Mikael Fernandus Simalango

XPath Basics. Mikael Fernandus Simalango XPath Basics Mikael Fernandus Simalango Agenda XML Overview XPath Basics XPath Sample Project XML Overview extensible Markup Language Constituted by elements identified by tags and attributes within Elements

More information

XSTREAM - QUICK GUIDE XSTREAM - OVERVIEW

XSTREAM - QUICK GUIDE XSTREAM - OVERVIEW XSTREAM - QUICK GUIDE http://www.tutorialspoint.com/xstream/xstream_quick_guide.htm Copyright tutorialspoint.com XSTREAM - OVERVIEW XStream is a simple Java-based library to serialize Java objects to XML

More information

Document Object Model (DOM) Java API for XML Parsing (JAXP) DOM Advantages & Disadvantage &6&7XWRULDO (GZDUG;LD

Document Object Model (DOM) Java API for XML Parsing (JAXP) DOM Advantages & Disadvantage &6&7XWRULDO (GZDUG;LD &6&7XWRULDO '20 (GZDUG;LD Document Object Model (DOM) DOM Supports navigating and modifying XML documents Hierarchical tree representation of documents DOM is a language-neutral specification -- Bindings

More information

BEAWebLogic. Integration. Transforming Data Using XQuery Mapper

BEAWebLogic. Integration. Transforming Data Using XQuery Mapper BEAWebLogic Integration Transforming Data Using XQuery Mapper Version: 10.2 Document Revised: March 2008 Contents Introduction Overview of XQuery Mapper.............................................. 1-1

More information

CMS SOAP CLIENT SOFTWARE REQUIREMENTS SPECIFICATION

CMS SOAP CLIENT SOFTWARE REQUIREMENTS SPECIFICATION CMS SOAP CLIENT SOFTWARE REQUIREMENTS SPECIFICATION CONTENTS 1. Introduction 1.1. Purpose 1.2. Scope Of Project 1.3. Glossary 1.4. References 1.5. Overview Of Document 2. Overall Description 2.1. System

More information

QosPolicyHolder:1 Erratum

QosPolicyHolder:1 Erratum Erratum Number: Document and Version: Cross References: Next sequential erratum number Effective Date: July 14, 2006 Document erratum applies to the service document QosPolicyHolder:1 This Erratum has

More information

SYNDICATING HIERARCHIES EFFECTIVELY

SYNDICATING HIERARCHIES EFFECTIVELY SDN Contribution SYNDICATING HIERARCHIES EFFECTIVELY Applies to: SAP MDM 5.5 Summary This document introduces hierarchy tables and a method of effectively sending out data stored in hierarchy tables. Created

More information

Generating XML. Crash course on generating XML

Generating XML. Crash course on generating XML Generating XML Crash course on generating XML What is XML? XML is a markup language using tags (entities surrounded in < and > ). XML stands for extensible Markup Language. Goals: simplicity, generality

More information

Döcu Content IBM Notes Domino, DB2 Oracle JDeveloper, WebLogic

Döcu Content IBM Notes Domino, DB2 Oracle JDeveloper, WebLogic Döcu Content IBM Notes Domino, DB2 Oracle JDeveloper, WebLogic Research/Create App Classes +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>> 2015.10.31.9.56.AM Getting IBM Lotus Notes

More information

I Exam Questions Demo XML Master. Exam Questions I XML Master: Professional V2

I Exam Questions Demo   XML Master. Exam Questions I XML Master: Professional V2 XML Master Exam Questions I10-002 XML Master: Professional V2 Version:Demo 1. Select which of the following correctly describes WSDL. (WSDL 1.1) A. WSDL assumes SOAP as the message transmission form B.

More information

XML An API Persepctive. Context. Overview

XML An API Persepctive. Context. Overview XML An API Persepctive Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring Context XML is designed to

More information

TC57 Use of XML Schema. Scott Neumann. October 3, 2005

TC57 Use of XML Schema. Scott Neumann. October 3, 2005 TC57 Use of XML Schema Scott Neumann October 3, 2005 Introduction The purpose of this presentation is to respond to an action item from the last WG14 meeting regarding the use of XML Schema by WG14 and

More information

SAX & DOM. Announcements (Thu. Oct. 31) SAX & DOM. CompSci 316 Introduction to Database Systems

SAX & DOM. Announcements (Thu. Oct. 31) SAX & DOM. CompSci 316 Introduction to Database Systems SAX & DOM CompSci 316 Introduction to Database Systems Announcements (Thu. Oct. 31) 2 Homework #3 non-gradiance deadline extended to next Thursday Gradiance deadline remains next Tuesday Project milestone

More information

Fall, 2005 CIS 550. Database and Information Systems Homework 5 Solutions

Fall, 2005 CIS 550. Database and Information Systems Homework 5 Solutions Fall, 2005 CIS 550 Database and Information Systems Homework 5 Solutions November 15, 2005; Due November 22, 2005 at 1:30 pm For this homework, you should test your answers using Galax., the same XQuery

More information

References between Mapping Programs in SAP-XI/PI as of Release 7.0 and 7.1

References between Mapping Programs in SAP-XI/PI as of Release 7.0 and 7.1 References between Mapping Programs in SAP-XI/PI as of Release 7.0 and 7.1 Applies to: This article talks about how different mapping programs can cross refer other archives, this is applicable to SAP-XI/PI

More information

XML APIs. Web Data Management and Distribution. Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart

XML APIs. Web Data Management and Distribution. Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart XML APIs Web Data Management and Distribution Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart http://gemo.futurs.inria.fr/wdmd January 25, 2009 Gemo, Lamsade, LIG, Telecom (WDMD)

More information

Java EE 7: Back-end Server Application Development 4-2

Java EE 7: Back-end Server Application Development 4-2 Java EE 7: Back-end Server Application Development 4-2 XML describes data objects called XML documents that: Are composed of markup language for structuring the document data Support custom tags for data

More information

Custom Data Access with MapObjects Java Edition

Custom Data Access with MapObjects Java Edition Custom Data Access with MapObjects Java Edition Next Generation Command and Control System (NGCCS) Tactical Operations Center (TOC) 3-D Concurrent Technologies Corporation Derek Sedlmyer James Taylor 05/24/2005

More information

* * DFDL Introduction For Beginners. Lesson 2: DFDL Language Basics. DFDL and XML Schema

* * DFDL Introduction For Beginners. Lesson 2: DFDL Language Basics. DFDL and XML Schema DFDL Introduction For Beginners Lesson 2: DFDL Language Basics Version Author Date Change 1 S Hanson 2011-01-24 Created 2 S Hanson 2011-01-24 Updated 3 S Hanson 2011-03-30 Improved 4 S Hanson 2012-02-29

More information

extensible Markup Language

extensible Markup Language What is XML? The acronym means extensible Markup Language It is used to describe data in a way which is simple, structured and (usually) readable also by humans Developed at the end of the ninenties by

More information

extensible Markup Language

extensible Markup Language What is XML? The acronym means extensible Markup Language It is used to describe data in a way which is simple, structured and (usually) readable also by humans Developed at the end of the ninenties by

More information

/// Rapport. / Testdocumentatie nieuwe versie Register producten en dienstverlening (IPDC)

/// Rapport. / Testdocumentatie nieuwe versie Register producten en dienstverlening (IPDC) /// Rapport / Testdocumentatie nieuwe versie Register producten en dienstverlening (IPDC) / Maart 2017 www.vlaanderen.be/informatievlaanderen Informatie Vlaanderen /// Aanpassingen aan de webservices Dit

More information

Approaches to using NEMSIS V3 Custom Elements

Approaches to using NEMSIS V3 Custom Elements NEMSIS TAC Whitepaper Approaches to using NEMSIS V3 Custom Elements Date August 17, 2011 July 31, 2013 (added section Restrictions, page 11) March 13, 2014 ( CorrelationID now reads CustomElementID as

More information

Restricting complextypes that have mixed content

Restricting complextypes that have mixed content Restricting complextypes that have mixed content Roger L. Costello October 2012 complextype with mixed content (no attributes) Here is a complextype with mixed content:

More information

Validation Language. GeoConnections Victoria, BC, Canada

Validation Language. GeoConnections Victoria, BC, Canada Validation Language Submitted To: Program Manager GeoConnections Victoria, BC, Canada Submitted By: Jody Garnett Brent Owens Refractions Research Inc. Suite 400, 1207 Douglas Street Victoria, BC, V8W-2E7

More information

Automotive Append - Version 1.0.0

Automotive Append - Version 1.0.0 Automotive Append - Version 1.0.0 WSDL: http://ws.strikeiron.com/autoappend?wsdl Product Web Page: http://www.strikeiron.com/data-enrichment/automotive-append/ Description: StrikeIron s Automotive Append

More information

Apache Xerces is a Java-based processor that provides standard interfaces and implementations for DOM, SAX and StAX XML parsing API standards.

Apache Xerces is a Java-based processor that provides standard interfaces and implementations for DOM, SAX and StAX XML parsing API standards. i About the Tutorial Apache Xerces is a Java-based processor that provides standard interfaces and implementations for DOM, SAX and StAX XML parsing API standards. This tutorial will teach you the basic

More information

Complex type. This subset is enough to model the logical structure of all kinds of non-xml data.

Complex type. This subset is enough to model the logical structure of all kinds of non-xml data. DFDL Introduction For Beginners Lesson 2: DFDL language basics We have seen in lesson 1 how DFDL is not an entirely new language. Its foundation is XML Schema 1.0. Although XML Schema was created as a

More information

Big Data for Engineers Spring Data Models

Big Data for Engineers Spring Data Models Ghislain Fourny Big Data for Engineers Spring 2018 11. Data Models pinkyone / 123RF Stock Photo CSV (Comma separated values) This is syntax ID,Last name,first name,theory, 1,Einstein,Albert,"General, Special

More information

X(ml)S(chema)D(definition) Complex Types Indicators

X(ml)S(chema)D(definition) Complex Types Indicators X(ml)S(chema)D(definition) Complex Types Indicators We can control HOW elements are to be used in documents with indicators. Indicators We have seven types of indicators: Order indicators: All Choice Sequence

More information

XML and Web Services

XML and Web Services XML and Web Services Lecture 8 1 XML (Section 17) Outline XML syntax, semistructured data Document Type Definitions (DTDs) XML Schema Introduction to XML based Web Services 2 Additional Readings on XML

More information

Understanding DOM. Presented by developerworks, your source for great tutorials ibm.com/developerworks

Understanding DOM. Presented by developerworks, your source for great tutorials ibm.com/developerworks Understanding DOM Presented by developerworks, your source for great tutorials Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to that section.

More information

:PRIA_DOCUMENT_v2_4_1.XSD

:PRIA_DOCUMENT_v2_4_1.XSD ==================================================================

More information

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. [MS-ASCNTC]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,

More information

PART 1. Eclipse IDE Tutorial. 1. What is Eclipse? Eclipse Java IDE

PART 1. Eclipse IDE Tutorial. 1. What is Eclipse? Eclipse Java IDE PART 1 Eclipse IDE Tutorial Eclipse Java IDE This tutorial describes the usage of Eclipse as a Java IDE. It describes the installation of Eclipse, the creation of Java programs and tips for using Eclipse.

More information

"mark up" documents with human-readable tags content is separate from description of content not limited to describing visual appearance

mark up documents with human-readable tags content is separate from description of content not limited to describing visual appearance XML and friends history/background GML (1969) SGML (1986) HTML (1992) World Wide Web Consortium (W3C) (1994) XML (1998) core language vocabularies, namespaces XHTML, SVG, MathML, Schema, validation Schema,

More information

Oracle B2B 11g Technical Note. Technical Note: 11g_005 Attachments. Table of Contents

Oracle B2B 11g Technical Note. Technical Note: 11g_005 Attachments. Table of Contents Oracle B2B 11g Technical Note Technical Note: 11g_005 Attachments This technical note lists the attachment capabilities available in Oracle B2B Table of Contents Overview... 2 Setup for Fabric... 2 Setup

More information

Notes. Any feedback/suggestions? IS 651: Distributed Systems

Notes. Any feedback/suggestions? IS 651: Distributed Systems Notes Grading statistics Midterm1: average 10.60 out of 15 with stdev 2.22 Total: average 15.46 out of 21 with stdev 2.80 A range: [18.26, 23] B range: [12.66, 18.26) C or worse range: [0, 12.66) The curve

More information

XML Extensible Markup Language

XML Extensible Markup Language XML Extensible Markup Language Generic format for structured representation of data. DD1335 (Lecture 9) Basic Internet Programming Spring 2010 1 / 34 XML Extensible Markup Language Generic format for structured

More information

Big Data 9. Data Models

Big Data 9. Data Models Ghislain Fourny Big Data 9. Data Models pinkyone / 123RF Stock Photo 1 Syntax vs. Data Models Physical view Syntax this is text. 2 Syntax vs. Data Models a Logical view

More information

Intellectual Property Rights Notice for Open Specifications Documentation

Intellectual Property Rights Notice for Open Specifications Documentation [MS-SSISPARAMS-Diff]: Intellectual Property Rights tice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats,

More information

MANAGING INFORMATION (CSCU9T4) LECTURE 2: XML STRUCTURE

MANAGING INFORMATION (CSCU9T4) LECTURE 2: XML STRUCTURE MANAGING INFORMATION (CSCU9T4) LECTURE 2: XML STRUCTURE Gabriela Ochoa http://www.cs.stir.ac.uk/~goc/ OUTLINE XML Elements vs. Attributes Well-formed vs. Valid XML documents Document Type Definitions (DTDs)

More information

Semantic Web. XML and XML Schema. Morteza Amini. Sharif University of Technology Fall 94-95

Semantic Web. XML and XML Schema. Morteza Amini. Sharif University of Technology Fall 94-95 ه عا ی Semantic Web XML and XML Schema Morteza Amini Sharif University of Technology Fall 94-95 Outline Markup Languages XML Building Blocks XML Applications Namespaces XML Schema 2 Outline Markup Languages

More information

Junos OS. NETCONF Java Toolkit Developer Guide. Modified: Copyright 2017, Juniper Networks, Inc.

Junos OS. NETCONF Java Toolkit Developer Guide. Modified: Copyright 2017, Juniper Networks, Inc. Junos OS NETCONF Java Toolkit Developer Guide Modified: 2017-08-11 Juniper Networks, Inc. 1133 Innovation Way Sunnyvale, California 94089 USA 408-745-2000 www.juniper.net Juniper Networks, the Juniper

More information

Create a Java project named week9

Create a Java project named week9 Objectives of today s lab: Through this lab, students will explore a hierarchical model for object-oriented design and examine the capabilities of the Java language provides for inheritance and polymorphism.

More information

[MS-TMPLDISC]: Template Discovery Web Service Protocol. Intellectual Property Rights Notice for Open Specifications Documentation

[MS-TMPLDISC]: Template Discovery Web Service Protocol. Intellectual Property Rights Notice for Open Specifications Documentation [MS-TMPLDISC]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,

More information

WA2217 Programming Java EE 6 SOAP Web Services with JAX-WS - JBoss / Eclipse EVALUATION ONLY

WA2217 Programming Java EE 6 SOAP Web Services with JAX-WS - JBoss / Eclipse EVALUATION ONLY WA2217 Programming Java EE 6 SOAP Web Services with JAX-WS - JBoss / Eclipse Web Age Solutions Inc. USA: 1-877-517-6540 Canada: 1-866-206-4644 Web: http://www.webagesolutions.com The following terms are

More information

[MS-SSISPARAMS-Diff]: Integration Services Project Parameter File Format. Intellectual Property Rights Notice for Open Specifications Documentation

[MS-SSISPARAMS-Diff]: Integration Services Project Parameter File Format. Intellectual Property Rights Notice for Open Specifications Documentation [MS-SSISPARAMS-Diff]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation ( this documentation ) for

More information

import org.simpleframework.xml.default; import org.simpleframework.xml.element; import org.simpleframework.xml.root;

import org.simpleframework.xml.default; import org.simpleframework.xml.element; import org.simpleframework.xml.root; C:/Users/dsteil/Documents/JavaSimpleXML/src/main/java/com/mycompany/consolecrudexample/Address.java / To change this template, choose Tools Templates and open the template in the editor. import org.simpleframework.xml.default;

More information

TP 6 des architectures logicielles Séance 6 : Architecture n-tiers avec du JPA avec plusieurs entités. 1 Préparation de l environnement Eclipse

TP 6 des architectures logicielles Séance 6 : Architecture n-tiers avec du JPA avec plusieurs entités. 1 Préparation de l environnement Eclipse TP 6 des architectures logicielles Séance 6 : Architecture n-tiers avec du JPA avec plusieurs entités 1 Préparation de l environnement Eclipse 1. Environment Used JDK 7 (Java SE 7) JPA 2.0 Eclipse MySQL

More information

CLIENT-SIDE XML SCHEMA VALIDATION

CLIENT-SIDE XML SCHEMA VALIDATION Factonomy Ltd The University of Edinburgh Aleksejs Goremikins Henry S. Thompson CLIENT-SIDE XML SCHEMA VALIDATION Edinburgh 2011 Motivation Key gap in the integration of XML into the global Web infrastructure

More information

Semantic Web Technologies and Automated Auctions

Semantic Web Technologies and Automated Auctions Semantic Web Technologies and Automated Auctions Papers: "Implementing Semantic Interoperability in Electronic Auctions" - Juha Puustjarvi (2007) "Ontologies for supporting negotiation in e-commerce" -

More information

Needed for: domain-specific applications implementing new generic tools Important components: parsing XML documents into XML trees navigating through

Needed for: domain-specific applications implementing new generic tools Important components: parsing XML documents into XML trees navigating through Chris Panayiotou Needed for: domain-specific applications implementing new generic tools Important components: parsing XML documents into XML trees navigating through XML trees manipulating XML trees serializing

More information

2006 Martin v. Löwis. Data-centric XML. XML Schema (Part 1)

2006 Martin v. Löwis. Data-centric XML. XML Schema (Part 1) Data-centric XML XML Schema (Part 1) Schema and DTD Disadvantages of DTD: separate, non-xml syntax very limited constraints on data types (just ID, IDREF, ) no support for sets (i.e. each element type

More information

Knowledge Engineering pt. School of Industrial and Information Engineering. Test 2 24 th July Part II. Family name.

Knowledge Engineering pt. School of Industrial and Information Engineering. Test 2 24 th July Part II. Family name. School of Industrial and Information Engineering Knowledge Engineering 2012 13 Test 2 24 th July 2013 Part II Family name Given name(s) ID 3 6 pt. Consider the XML language defined by the following schema:

More information

Big Data Fall Data Models

Big Data Fall Data Models Ghislain Fourny Big Data Fall 2018 11. Data Models pinkyone / 123RF Stock Photo CSV (Comma separated values) This is syntax ID,Last name,first name,theory, 1,Einstein,Albert,"General, Special Relativity"

More information

WEB SERVICES EXAMPLE 2

WEB SERVICES EXAMPLE 2 INTERNATIONAL UNIVERSITY HCMC PROGRAMMING METHODOLOGY NONG LAM UNIVERSITY Instructor: Dr. Le Thanh Sach FACULTY OF IT WEBSITE SPECIAL SUBJECT Student-id: Instructor: LeMITM04015 Nhat Tung Course: IT.503

More information

Java Cookbook. Java Action specification. $ java -Xms512m a.b.c.mymainclass arg1 arg2

Java Cookbook. Java Action specification. $ java -Xms512m a.b.c.mymainclass arg1 arg2 Java Cookbook This document comprehensively describes the procedure of running Java code using Oozie. Its targeted audience is all forms of users who will install, use and operate Oozie. Java Action specification

More information

Tutorial: Define Information Model Author: Stefan Suermann

Tutorial: Define Information Model Author: Stefan Suermann Tutorial: Define Information Model Author: Stefan Suermann Table of contents 1 2 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.6 Describing the model... Implementing the model... Creating schemas... Child elements...

More information

Introduction. Sample Input Document. A Survey of APIs and Techniques for Processing XML By Dare Obasanjo July 09, 2003

Introduction. Sample Input Document. A Survey of APIs and Techniques for Processing XML By Dare Obasanjo July 09, 2003 1 de 9 07/10/2008 19:22 Published on XML.com http://www.xml.com/pub/a/2003/07/09/xmlapis.html See this if you're having trouble printing code examples A Survey of APIs and Techniques for Processing XML

More information

Class Example. student.h file: Declaration of the student template. #ifndef STUDENT_H_INCLUDED #define STUDENT_H_INCLUDED

Class Example. student.h file: Declaration of the student template. #ifndef STUDENT_H_INCLUDED #define STUDENT_H_INCLUDED Class Example student.h file: Declaration of the student template. #ifndef STUDENT_H_INCLUDED #define STUDENT_H_INCLUDED #include #include using namespace std; class student public:

More information

PISOA Interface Specification. Fall 2017 Release

PISOA Interface Specification. Fall 2017 Release PISOA Interface Specification Fall 2017 Release Version: 1.0 July 21, 2017 Revision History Date Version Description 07/21/2017 1.0 Initial document release related to the PISO Interfaces. RequestVERMeasurements

More information

[MS-WORDSSP]: Word Automation Services Stored Procedures Protocol Specification

[MS-WORDSSP]: Word Automation Services Stored Procedures Protocol Specification [MS-WORDSSP]: Word Automation Services Stored Procedures Protocol Specification Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open

More information

A POLICY-BASED DIALOGUE SYSTEM FOR PHYSICAL ACCESS CONTROL

A POLICY-BASED DIALOGUE SYSTEM FOR PHYSICAL ACCESS CONTROL A POLICY-BAED DIALOGUE YTEM FOR PHYICAL ACCE CONTROL TID 2012 GEORGE MAON UNIVERITY 10/25/2012 MOHAMMAD ABABNEH (George Mason University) DUMINDA WIJEEKERA (George Mason University) JAME BRET MICHAEL (Naval

More information

HIBERNATE - INTERCEPTORS

HIBERNATE - INTERCEPTORS HIBERNATE - INTERCEPTORS http://www.tutorialspoint.com/hibernate/hibernate_interceptors.htm Copyright tutorialspoint.com As you have learnt that in Hibernate, an object will be created and persisted. Once

More information

Simple API for XML (SAX)

Simple API for XML (SAX) Simple API for XML (SAX) Asst. Prof. Dr. Kanda Runapongsa (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Topics Parsing and application SAX event model SAX event handlers Apache

More information

Topic 1 Code Reviewers 2 APT Developer Primer 3 Schemas 3.1 Nirspec xsd 3.2 NirspecFixedSlitSpectroscopy xsd 3.3 NirspecIFUSpectrocopy xsd 3.

Topic 1 Code Reviewers 2 APT Developer Primer 3 Schemas 3.1 Nirspec xsd 3.2 NirspecFixedSlitSpectroscopy xsd 3.3 NirspecIFUSpectrocopy xsd 3. NirSpec_TFI Code Review TOC.oo3 Topic 1 Code Reviewers 2 APT Developer Primer 3 Schemas 3.1 Nirspec xsd 3.2 NirspecFixedSlitSpectroscopy xsd 3.3 NirspecIFUSpectrocopy xsd 3.4 NirspecMOS xsd 3.5 NirspecDark

More information

Constructing a Multi-Tier Application in ASP.NET

Constructing a Multi-Tier Application in ASP.NET Bill Pegram 12/16/2011 Constructing a Multi-Tier Application in ASP.NET The references provide different approaches to constructing a multi-tier application in ASP.NET. A connected model where there is

More information

Framing how values are extracted from the data stream. Includes properties for alignment, length, and delimiters.

Framing how values are extracted from the data stream. Includes properties for alignment, length, and delimiters. DFDL Introduction For Beginners Lesson 3: DFDL properties In lesson 2 we learned that in the DFDL language, XML Schema conveys the basic structure of the data format being modeled, and DFDL properties

More information

Can a language be before the first programming language?

Can a language be before the first programming language? Can a language be before the first programming language? menyhart@elte.hu ELTE IK Abstract. I would like to present a potential new language which can be used before the first programming language. We

More information

CS 201, Fall 2016 Sep 28th Exam 1

CS 201, Fall 2016 Sep 28th Exam 1 CS 201, Fall 2016 Sep 28th Exam 1 Name: Question 1. [5 points] Write code to prompt the user to enter her age, and then based on the age entered, print one of the following messages. If the age is greater

More information

Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB)

Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB) Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB) In this exercise, we will create a simple Android application that uses IBM Bluemix Cloudant NoSQL DB. The application

More information

Web Computing. Revision Notes

Web Computing. Revision Notes Web Computing Revision Notes Exam Format The format of the exam is standard: Answer TWO OUT OF THREE questions Candidates should answer ONLY TWO questions The time allowed is TWO hours Notes: You will

More information

SSE3052: Embedded Systems Practice

SSE3052: Embedded Systems Practice SSE3052: Embedded Systems Practice Minwoo Ahn minwoo.ahn@csl.skku.edu Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE3052: Embedded Systems Practice, Spring 2018, Jinkyu Jeong

More information

1) Consider the following code segment, applied to list, an ArrayList of Integer values.

1) Consider the following code segment, applied to list, an ArrayList of Integer values. Advanced Computer Science Unit 7 Review Part I: Multiple Choice (12 questions / 4 points each) 1) What is the difference between a regular instance field and a static instance field? 2) What is the difference

More information

Lecture Notes course Software Development of Web Services

Lecture Notes course Software Development of Web Services Lecture Notes course 02267 Software Development of Web Services Hubert Baumeister huba@dtu.dk Fall 2014 Contents 1 Complex Data and XML Schema 1 2 Binding to Java 8 3 User defined Faults 9 4 WSDL: Document

More information

P2: Advanced Java & Exam Preparation

P2: Advanced Java & Exam Preparation P2: Advanced Java & Exam Preparation Claudio Corrodi May 18 2018 1 Java 8: Default Methods public interface Addressable { public String getstreet(); public String getcity(); public String getfulladdress();

More information

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. [MS-TPXS]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,

More information

Chapter 3 Brief Overview of XML

Chapter 3 Brief Overview of XML Slide 3.1 Web Serv vices: Princ ciples & Te echno ology Chapter 3 Brief Overview of XML Mike P. Papazoglou & mikep@uvt.nl Slide 3.2 Topics XML document structure XML schemas reuse Document navigation and

More information

Understanding DOM. Presented by developerworks, your source for great tutorials ibm.com/developerworks

Understanding DOM. Presented by developerworks, your source for great tutorials ibm.com/developerworks Understanding DOM Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Tutorial introduction. 2 2. What is the DOM? 4 3.

More information

Developing CMP 2.0 Entity Beans

Developing CMP 2.0 Entity Beans 863-5ch11.fm Page 292 Tuesday, March 12, 2002 2:59 PM Developing CMP 2.0 Entity Beans Topics in This Chapter Characteristics of CMP 2.0 Entity Beans Advantages of CMP Entity Beans over BMP Entity Beans

More information

Object Oriented Programming

Object Oriented Programming Object Oriented Programming Debapriyo Majumdar Programming and Data Structure Lab M Tech CS I Semester I Indian Statistical Institute Kolkata August 7 and 14, 2014 Objects Real world objects, or even people!

More information

Work/Studies History. Programming XML / XSD. Database

Work/Studies History. Programming XML / XSD. Database Work/Studies History 1. What was your emphasis in your bachelor s work at XXX? 2. What was the most interesting project you worked on there? 3. What is your emphasis in your master s work here at UF? 4.

More information