have a look at the xml namespaces... if that fails, look for common xpath portiions, e.g. /project/target is never going to be a valid pom
/project/modelVersion along with a number of other fields are required to have a valid pom On 8 March 2010 10:40, amaresh mourya <[email protected]> wrote: > Hi All, > I want to write a recognizer class which takes input any xml file and > returns true or false based on , whether or not the xml is POM. > > Problem : Since Ant's build file and POM both have <project> root element > with/without Namespace. > > I don't want POM Name to be restricted to just "pom.xml", this could be > anything say "myproj.xml" etc. Still I want this "myProj.xml" to be > recognized as POM with above Recognizer class. > > Can same one suggest me the conditions to differentiate between them. >
