<s>
srcML	B-Application
(	O
source	O
M	O
L	O
)	O
is	O
a	O
document-oriented	O
XML	O
representation	O
of	O
source	O
code	O
.	O
</s>
<s>
The	O
abbreviation	O
,	O
srcML	B-Application
,	O
is	O
short	O
for	O
Source	O
Markup	O
Language	O
.	O
</s>
<s>
srcML	B-Application
wraps	O
source	O
code	O
(	O
text	O
)	O
with	O
information	O
from	O
the	O
Abstract	O
Syntax	O
Tree	O
or	O
AST	O
(	O
tags	O
)	O
into	O
a	O
single	O
XML	O
document	O
.	O
</s>
<s>
All	O
original	O
text	O
is	O
preserved	O
so	O
that	O
the	O
original	O
source	O
code	O
document	O
can	O
be	O
recreated	O
from	O
the	O
srcML	B-Application
markup	O
.	O
</s>
<s>
The	O
purpose	O
of	O
srcML	B-Application
is	O
to	O
provide	O
full	O
access	O
to	O
the	O
source	O
code	O
at	O
the	O
lexical	O
,	O
documentary	O
,	O
structural	O
,	O
and	O
syntactic	O
levels	O
.	O
</s>
<s>
It	O
is	O
supported	O
by	O
the	O
srcML	B-Application
toolkit	O
maintained	O
on	O
the	O
website	O
and	O
has	O
been	O
shown	O
to	O
perform	O
scalable	O
,	O
lightweight	O
fact-extraction	O
and	O
transformation	O
.	O
</s>
<s>
The	O
srcML	B-Application
toolkit	O
consists	O
of	O
the	O
command-line	O
program	O
called	O
srcml	B-Application
,	O
which	O
translates	O
from	O
source	O
code	O
to	O
srcML	B-Application
when	O
provided	O
a	O
code	O
file	O
on	O
the	O
command	O
line	O
or	O
translates	O
from	O
srcML	B-Application
to	O
source	O
code	O
when	O
a	O
srcml	B-Application
archive	O
is	O
provided	O
on	O
the	O
command	O
line	O
.	O
</s>
<s>
The	O
program	O
also	O
supports	O
direct	O
queries	O
and	O
transformations	O
of	O
srcML	B-Application
archives	O
using	O
tools	O
like	O
XPath	O
,	O
XSLT	O
,	O
and	O
RELAXNG	O
.	O
</s>
<s>
The	O
srcML	B-Application
toolkit	O
is	O
actively	O
maintained	O
and	O
currently	O
support	O
C	O
,	O
C++	O
,	O
C#	O
,	O
and	O
Java	O
.	O
</s>
<s>
The	O
srcML	B-Application
format	O
consists	O
of	O
all	O
text	O
from	O
the	O
original	O
source	O
code	O
file	O
plus	O
XML	O
tags	O
.	O
</s>
<s>
Specifically	O
,	O
the	O
text	O
is	O
wrapped	O
with	O
srcML	B-Application
elements	O
that	O
indicate	O
the	O
syntactic	O
structure	O
of	O
the	O
code	O
.	O
</s>
<s>
The	O
tags	O
used	O
in	O
srcML	B-Application
are	O
listed	O
out	O
below	O
along	O
with	O
what	O
category	O
they	O
fall	O
within	O
.	O
</s>
<s>
srcML	B-Application
uses	O
XML	O
namespaces	O
.	O
</s>
<s>
Note	O
:	O
for	O
a	O
srcML	B-Application
archive	O
,	O
the	O
entire	O
project	O
will	O
be	O
contained	O
within	O
a	O
single	O
root	O
unit	O
element	O
,	O
and	O
each	O
individual	O
file	O
will	O
be	O
contained	O
as	O
a	O
unit	O
element	O
within	O
the	O
root	O
unit	O
element	O
.	O
</s>
<s>
The	O
following	O
shows	O
how	O
srcml	B-Application
can	O
be	O
used	O
on	O
single	O
files	O
.	O
</s>
<s>
The	O
following	O
example	O
converts	O
the	O
C++	O
file	O
main.cpp	O
to	O
the	O
srcML	B-Application
file	O
main.cpp.xml	O
:	O
</s>
<s>
srcML	B-Application
allows	O
the	O
use	O
of	O
most	O
if	O
not	O
all	O
current	O
XML	O
APIs	O
and	O
tools	O
to	O
write	O
transformations	O
.	O
</s>
<s>
Using	O
srcML	B-Application
's	O
markup	O
with	O
XSLT	O
allows	O
the	O
user	O
to	O
apply	O
Program	B-Application
Transformations	I-Application
on	O
an	O
XML-like	O
structure(srcML )	O
to	O
obtain	O
transformed	O
xml	O
which	O
can	O
then	O
be	O
written	O
back	O
its	O
source	O
code	O
representation	O
using	O
the	O
srcml2src	O
tool	O
.	O
</s>
<s>
The	O
application	O
of	O
srcML	B-Application
to	O
program	B-Application
transformation	I-Application
is	O
explained	O
,	O
in	O
detail	O
,	O
by	O
Collard	O
et	O
al	O
.	O
</s>
<s>
In	O
it	O
simplest	O
form	O
,	O
Fact	O
Extraction	O
using	O
srcML	B-Application
leverages	O
XPath	O
in	O
order	O
to	O
address	O
parts	O
of	O
the	O
srcML	B-Application
document	O
and	O
pull	O
information	O
about	O
various	O
entities	O
or	O
characteristics	O
of	O
the	O
source	O
code	O
.	O
</s>
<s>
The	O
application	O
of	O
srcML	B-Application
to	O
fact	O
extraction	O
is	O
explained	O
,	O
in	O
detail	O
,	O
by	O
Kagdi	O
et	O
al	O
.	O
</s>
<s>
An	O
example	O
to	O
create	O
a	O
srcML	B-Application
archive	O
from	O
an	O
entire	O
software	O
project	O
.	O
</s>
<s>
srcML	B-Application
brings	O
a	O
lot	O
of	O
advantages	O
to	O
doing	O
difference	O
analysis	O
on	O
source	O
code	O
.	O
</s>
<s>
The	O
application	O
of	O
srcML	B-Application
for	O
difference	O
Analysis	O
is	O
explained	O
,	O
in	O
detail	O
,	O
by	O
Maletic	O
et	O
al	O
.	O
</s>
<s>
As	O
an	O
example	O
of	O
how	O
srcML	B-Application
is	O
used	O
,	O
here	O
is	O
an	O
XPath	O
expression	O
that	O
could	O
be	O
used	O
to	O
find	O
all	O
classes	O
in	O
a	O
source	O
document	O
:	O
</s>
<s>
Due	O
to	O
the	O
fact	O
that	O
srcML	B-Application
is	O
based	O
on	O
xml	O
,	O
all	O
XML	O
tools	O
can	O
be	O
used	O
with	O
srcML	B-Application
,	O
which	O
provides	O
rich	O
functionality	O
.	O
</s>
