I am reading XML documents from a stream into a string. However, there is the possibility of multiple XML documents (identically structured) within the same string. I read several questions on stackoverflow and other sites which provided examples of splitting using XPath and some other methods. In my case will it be fine for me to simply use Java's String.spit() method?
All I require is for a string with two or more identically structured XML documents be split into separate strings. I'm asking because I have not seen anyone else made mention of this, so in the event that I am missing the obvious reason for this please point it out. Thank you.
Each document is structured as follows:
<?xml version = "1.0" encoding = "UTF-8"?>
<telemetry>
........
</telemetry>