我有以下xml,其中<first>
标记中包含名称空间。
我无法获取<second>
代码数据。
<first xmlns= "url" xmlns:xsi="url" xsi:schemaLocation="url">
<second> hello world </second>
</first>
我写的映射文件:
<mapping>
<description>A mapping file</description>
<class name="com.example.data.First">
<field name="xmlns" type="string" >
<bind-xml name="xmlns" node="attribute" />
</field>
<field name="xmlnsxsi" type="string" >
<bind-xml name="xmlns:xsi" node="attribute" />
</field>
<field name="xsischemaLocation" type="string" >
<bind-xml name="xsi:schemaLocation" node="attribute" />
</field>
<field name="second" type="String"/>
</class>
</mapping>
我应该在映射文件中更改什么才能获得值?
我正在
org.exolab.castor.xml.MarshalException: The namespace associated with the prefix: 'xmlns' is null.