posted 16 years ago
Hi all,
Can you please look on the mapping xml for the following xml file .I need to unmarshell the xml file .
The source xml file is like
<product_model>
<record>
<categories>C</categories>
<levelRank>00</levelRank>
<parentID>00</parentID>
<id>01</id>
<catalogName>Consumer Products</catalogName>
<materialName>Consumer Products</materialName>
</record>
<record>
<categories>C</categories>
<levelRank>00</levelRank>
<parentID>01</parentID>
<id>02</id>
<catalogName>Television Projector</catalogName>
<materialName>Television Projector</materialName>
</record>
<record>
<categories>C</categories>
<levelRank>00</levelRank>
<parentID>01</parentID>
<id>03</id>
<catalogName>Home Video</catalogName>
<materialName>Home Video</materialName>
</record>
.....................................
..............................
<product_model>
I defined the mapping xml in the following format
<class name="ProductModel">
<map-to xml="product_model"/>
<field name="categories" type="java.lang.String" >
<bind-xml name="categories" node="element" location="record" />
</field>
<field name="levelRank" type="java.lang.String" >
<bind-xml name="levelRank" node="element" location="record" />
</field>
<field name="parentID" type="java.lang.String" >
<bind-xml name="parentID" node="element" location="record"/>
</field>
<field name="id" type="java.lang.String" >
<bind-xml name="id" node="element" location="record"/>
</field>
<field name="catalogName" type="java.lang.String" >
<bind-xml name="catalogName" node="element" location="record"/>
</field>
<field name="materialName" type="java.lang.String" >
<bind-xml name="materialName" node="element" location="record"/>
</field>
</class>
</mapping>
It is not binding the data to the object.
The value of object is showing null.
Can anybody please help me?
[ October 22, 2008: Message edited by: Nishad Abdul kareem ]