I’m doing an app which can parse XML files generated from different programs. I need to check the first line of the file to detect which program has generated the xml and call the correct method to parse it.
i.e one of the file generated starts with this line:
<PROFILE XYZ="1">
another program generates the file starting with this line:
<AppXYZ DBVersion="1.2.3.4">
I need to check this line.
Any help is appreciated.
Thanks,
Max
It’s XML, so just parse it as XML. Check the first element and decide from there. SAX or DOM, either works.