How can we verify if the contents of a file is in xml format or not..?
807589Nov 10 2008 — edited Nov 12 2008Hi
I am developing a code and am stuck with a part where i have to determine if the contents of a file are in xml format. I want to specify the staement that i have to determine if a file has data in xml format or an ordinary text.
the requirement that i face is to read a file and find if it has content in an xml format irrespective of its extention.
For there can be files havinf .txt extention and havnig contents as in a XML file. i have to read those fiels and process them as a xml files.
Is there any java methjod or API that will help me to fulfill my requirement. Any suggestions will be valuable.
Thanks and Cheers
Phoenix