What Is JAXB?
XML and Java technology are the building
blocks for developing Web services and
applications that access Web services.
The Java API for XML Binding (JAXB) is
often used to access XML documents from
applications written in the Java programmin
JAXB uses XSD schema to build Java
classes to represent XML elements
Unmarshalling - is the process of producing
Java objects that represent the XML elements.
Marshalling - is the process of producing
XML elements that represent Java objects.
Review Of Regular Expressions Cont.
The "\" (backslash) character is super
special in regexes. It "turns off" (or
"escapes") the special meaning of any
following meta character (so, for example, "\."
matches a dot, literally) and "turns on" special
A Simpler Example
Here is a simple XML fragment:
<title>My XML Book</title>
A possible DTD defining the elements
present in this XML fragment could look like:
<!ELEMENT book(title, author,
Some Reasons For Using XML
to transform document structure and formats
to publish documents in multiple formats,
XSL - FO
to publish news items on the web, eg RSS
to exchange business documents, eg ebXML
to provide Web Services, eg SOAP
Simple Data Types In XML Schema Cont.
There are a very large number of "facets" in
XML Schema. For example, in addition to
those in the example, we could
use: minExclusive,maxExclusive, totalDigits and fractio
We could also enumerate all possible
Although DTDs are very useful (particularly
for narrative-like documents) they do not have
the expressive power needed for XML data
Problems with DTDs include:
Uses a different syntax to XML
Can only express simple
XML Schema Built-In Data Types
This table is from the XML Schema
Recommendation Part 0
Table 2. Simple Types Built In to XML Schema Types
Examples (delimited by commas)
Confirm this is electric
XML Schema Elements
XML documents are, in general, composed
of nested elements
"xsd:element" is the most-used specifier in
schemas. An element can be
of simple or complex type.
Elements can be specified with an
optional Occurrence Constraint. This is give
Example From W3C
W3C Purchase Order Example