Assuming an XML file with unknown structure (i.e., unknown element and attribute names), like
<RootElement>
<Level 1 ...>
<Level 2 ...>
...
</Level 2>
<Level 2 ...>
...
</Level 2>
</Level 1>
<Level 1 ...>
<Level 2 ...>
...
</Level 2>
<Level 2 ...>
...
</Level 2>
</Level 1>
</RootElement>
Is there any way using StAX to get the full raw text of each element?
At least, how can this be done for the first level, i.e. in the above example (ignoring pretty printing) how can we read the following 2 strings in a Java String variable:
"<Level 1 ...><Level 2...>...</Level 2></Level 1>"
and
"<Level 1 ...><Level 2...>...</Level 2></Level 1>"