<s>
In	O
computing	O
,	O
the	O
Java	B-Language
API	I-Language
for	I-Language
XML	I-Language
Processing	I-Language
,	O
or	O
JAXP	B-Language
(	O
)	O
,	O
one	O
of	O
the	O
Java	B-Language
XML	I-Language
Application	B-Application
programming	I-Application
interfaces	I-Application
,	O
provides	O
the	O
capability	O
of	O
validating	O
and	O
parsing	O
XML	B-Protocol
documents	I-Protocol
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
parsing	O
interfaces	O
,	O
the	O
API	B-Application
provides	O
an	O
XSLT	B-Application
interface	O
to	O
provide	O
data	O
and	O
structural	O
transformations	O
on	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
JAXP	B-Language
was	O
developed	O
under	O
the	O
Java	B-Language
Community	I-Language
Process	I-Language
as	O
JSR	B-Language
5	I-Language
(	O
JAXP	B-Language
1.0	O
)	O
,	O
JSR	B-Language
63	I-Language
(	O
JAXP	B-Language
1.1	O
and	O
1.2	O
)	O
,	O
and	O
JSR	B-Language
206	I-Language
(	O
JAXP	B-Language
1.3	O
)	O
.	O
</s>
<s>
JAXP	B-Language
version	O
1.4.4	O
was	O
released	O
on	O
September	O
3	O
,	O
2010	O
.	O
</s>
<s>
JAXP	B-Language
1.3	O
was	O
declared	O
on	O
February	O
12	O
,	O
2008	O
.	O
</s>
<s>
The	B-General_Concept
DOM	I-General_Concept
interface	O
parses	O
an	O
entire	O
XML	B-Protocol
document	I-Protocol
and	O
constructs	O
a	O
complete	O
in-memory	O
representation	O
of	O
the	O
document	O
using	O
the	O
classes	O
and	O
modeling	O
the	O
concepts	O
found	O
in	O
the	O
Document	B-General_Concept
Object	I-General_Concept
Model	I-General_Concept
Level	O
2	O
Core	O
Specification	O
.	O
</s>
<s>
The	B-General_Concept
DOM	I-General_Concept
parser	O
is	O
called	O
a	O
DocumentBuilder	O
,	O
as	O
it	O
builds	O
an	O
in-memory	O
Document	O
representation	O
.	O
</s>
<s>
The	O
javax.xml.parsers.DocumentBuilder	O
is	O
created	O
by	O
the	O
javax.xml.parsers.DocumentBuilderFactory	O
.	O
</s>
<s>
The	O
DocumentBuilder	O
creates	O
an	O
instance	O
-	O
a	O
tree	O
structure	O
containing	O
nodes	O
in	O
the	O
XML	B-Protocol
Document	I-Protocol
.	O
</s>
<s>
Among	O
the	O
many	O
different	O
types	O
of	O
tree	O
nodes	O
,	O
each	O
representing	O
the	O
type	O
of	O
data	O
found	O
in	O
an	O
XML	B-Protocol
document	I-Protocol
,	O
the	O
most	O
important	O
include	O
:	O
</s>
<s>
The	O
javax.xml.parsers.SAXParserFactory	O
creates	O
the	O
SAX	B-Application
parser	I-Application
,	O
called	O
the	O
SAXParser	O
.	O
</s>
<s>
Unlike	O
the	B-General_Concept
DOM	I-General_Concept
parser	O
,	O
the	O
SAX	B-Application
parser	I-Application
does	O
not	O
create	O
an	O
in-memory	O
representation	O
of	O
the	O
XML	B-Protocol
document	I-Protocol
and	O
so	O
runs	O
faster	O
and	O
uses	O
less	O
memory	O
.	O
</s>
<s>
Instead	O
,	O
the	O
SAX	B-Application
parser	I-Application
informs	O
clients	O
of	O
the	O
XML	B-Protocol
document	I-Protocol
structure	O
by	O
invoking	O
callbacks	O
,	O
that	O
is	O
,	O
by	O
invoking	O
methods	O
on	O
an	O
org.xml.sax.helpers.DefaultHandler	O
instance	O
provided	O
to	O
the	O
parser	O
.	O
</s>
<s>
This	O
way	O
of	O
accessing	O
document	O
is	O
called	O
Streaming	B-Language
XML	I-Language
.	O
</s>
<s>
Most	O
clients	O
will	O
be	O
interested	O
in	O
methods	O
defined	O
in	O
the	O
ContentHandler	O
interface	O
that	O
are	O
called	O
when	O
the	O
SAX	B-Application
parser	I-Application
encounters	O
the	O
corresponding	O
elements	O
in	O
the	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
startDocument( )	O
and	O
endDocument( )	O
methods	O
that	O
are	O
called	O
at	O
the	O
start	O
and	O
end	O
of	O
a	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
characters( )	O
method	O
that	O
is	O
called	O
with	O
the	O
text	O
data	O
contents	O
contained	O
between	O
the	O
start	O
and	O
end	O
tags	O
of	O
an	O
XML	B-Protocol
document	I-Protocol
element	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
store	O
a	O
local	O
cache	O
for	O
frequently	O
used	O
documents	O
using	O
an	O
XML	B-Language
Catalog	I-Language
.	O
</s>
<s>
StAX	B-Language
was	O
designed	O
as	O
a	O
median	O
between	O
the	B-General_Concept
DOM	I-General_Concept
and	O
SAX	O
interface	O
.	O
</s>
<s>
This	O
is	O
different	O
from	O
an	O
event	O
based	O
API	B-Application
-	O
such	O
as	O
SAX	O
-	O
which	O
'	O
pushes	O
 '	O
data	O
to	O
the	O
application	O
-	O
requiring	O
the	O
application	O
to	O
maintain	O
state	O
between	O
events	O
as	O
necessary	O
to	O
keep	O
track	O
of	O
location	O
within	O
the	O
document	O
.	O
</s>
<s>
The	O
XML	B-Protocol
Stylesheet	O
Language	O
for	O
Transformations	O
,	O
or	O
XSLT	B-Application
,	O
allows	O
for	O
conversion	O
of	O
an	O
XML	B-Protocol
document	I-Protocol
into	O
other	O
forms	O
of	O
data	O
.	O
</s>
<s>
JAXP	B-Language
provides	O
interfaces	O
in	O
package	O
javax.xml.transform	O
allowing	O
applications	O
to	O
invoke	O
an	O
XSLT	B-Application
transformation	O
.	O
</s>
<s>
This	O
interface	O
was	O
originally	O
called	O
TrAX	O
(	O
Transformation	O
API	B-Application
for	O
XML	B-Protocol
)	O
,	O
and	O
was	O
developed	O
by	O
an	O
informal	O
collaboration	O
between	O
the	O
developers	O
of	O
a	O
number	O
of	O
Java	O
XSLT	B-Application
processors	I-Application
.	O
</s>
<s>
a	O
factory	O
class	O
allowing	O
the	O
application	O
to	O
select	O
dynamically	O
which	O
XSLT	B-Application
processor	I-Application
it	O
wishes	O
to	O
use	O
(	O
TransformerFactory	O
,	O
TransformerFactory.NewInstance( )	O
,	O
TransformerFactory.newInstance(java.lang.String,_java.lang.ClassLoader )	O
)	O
.	O
</s>
<s>
This	O
is	O
a	O
thread-safe	O
object	O
that	O
can	O
be	O
used	O
repeatedly	O
,	O
in	O
series	O
or	O
in	O
parallel	O
,	O
to	O
apply	O
the	O
same	O
stylesheet	O
to	O
multiple	O
source	O
documents	O
(	O
or	O
to	O
the	O
same	O
source	O
document	O
with	O
different	O
parameters	O
)	O
(	O
TransformerFactory.newTemplates(javax.xml.transform.Source )	O
,	O
also	O
TransformerFactory.newTransformer(javax.xml.transform.Source )	O
,	O
TransformerFactory.newTransformer( )	O
)	O
,	O
a	O
method	O
on	O
the	O
Templates	O
object	O
to	O
create	O
a	O
Transformer	O
,	O
representing	O
the	O
executable	O
form	O
of	O
a	O
stylesheet	O
(Templates.newTransformer( )	O
)	O
This	O
cannot	O
be	O
shared	O
across	O
threads	O
,	O
though	O
it	O
is	O
serially	O
reusable	O
.	O
</s>
<s>
(	O
Transformer.transform(javax.xml.transform.Source,_javax.xml.transform.Result )	O
)	O
.	O
</s>
<s>
In	O
practice	O
all	O
JAXP	B-Language
processors	O
support	O
the	O
three	O
standard	O
kinds	O
of	O
Source	O
(	O
DOMSource	O
,	O
SAXSource	O
,	O
StreamSource	O
)	O
and	O
the	O
three	O
standard	O
kinds	O
of	O
Result	O
(	O
DOMResult	O
,	O
SAXResult	O
,	O
StreamResult	O
)	O
and	O
possibly	O
other	O
implementations	O
of	O
their	O
own	O
.	O
</s>
<s>
The	O
most	O
primitive	O
but	O
complete	O
example	O
of	O
XSLT	B-Application
transformation	O
launching	O
may	O
look	O
like	O
this	O
:	O
</s>
<s>
It	O
applies	O
the	O
following	O
hardcoded	O
XSLT	B-Application
transformation	O
:	O
</s>
<s>
To	O
the	O
following	O
hardcoded	O
XML	B-Protocol
document	I-Protocol
:	O
</s>
