我终于找到了答案。我想使用的xml中缺少namepace声明。它可以与以下形状正确的形状一起使用:
<?xml version="1.0" encoding="UTF-8" ?> <foo:foo xmlns:foo="http://www.example.jibx.org/generated/v30/foo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.jibx.org/generated/v30/foo foo-3.0.xsd"> <generic> <type>12345</type> <isValid>1</isValid> </generic> <specific> <label>Label example</label> <dateFoo>01/01/2015</dateFoo> </specific> </foo:foo>



