I have the following xml in which <first>
tag has the namespaces in it .
I am not able to get the <second>
tag data.
<first xmlns= "url" xmlns:xsi="url" xsi:schemaLocation="url">
<second> hello world </second>
</first>
Mapping file i have written :
<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>
What should i change in the mapping file to get the value of ?
I am getting
org.exolab.castor.xml.MarshalException: The namespace associated with the prefix: 'xmlns' is null.