|
Thanks for the question.
For a network device, loading XML in a byte array is usually needed for store and forward applications, and is less CPU-intensive than parsing in general.
Decoding on the fly is usually pretty simple, partly because most characters are ASCII ( I could be wrong, but that is my experience thus far)
To test equality of two UCS2 characters
String s1;
String s2;
if (s1.charAt(i) == s2.charAt(k))
{}
the code for testing the equality in "non-extractive" parsing is
String s1;
byte[] xml;
if (s1.charAt(i) == xml[k])
{
}
|