xmllint --xpath "//project" test.xml
fails on
<?xml version="1.0" encoding="UTF-8"?>
<projects>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
</project>
</projects>
but succeeds if I remove the xmlns attribute like this:
<?xml version="1.0" encoding="UTF-8"?>
<projects>
<project>
<modelVersion>4.0.0</modelVersion>
</project>
</projects>
Is there some problem with this? Is xmlns legal on non-top level tags?
I'm using Java Maven:
mvn help:effective-pom
and that generates xml with the xmlns on the non-top elements like shown.