dikshyant.pradhan
11 Aug 2012, 5:37 PM
Hi
I have an Xml response from server like,
<properties>
<property id=”123” name=”p1”>
<value name=”v1” attrb1=”12” />
<value name=”v3” attrb1=”12” />
<value name=”v4” attrb1=”12” />
</property>
<property id=”13” name=”p2”>
<value name=”v2” attrb1=”12” />
</property>
<properties>
I understand that using 'hasMany' config I can store the xml data into two models (say, Property & Value),only if the value elements are inside a <values> </values> tag. For example,
<property id=”123” name=”p1”>
<values>
<value name=”v1” attrb1=”12” />
<value name=”v3” attrb1=”12” />
<value name=”v4” attrb1=”12” />
</values>
</property>
But, my server response doesn't have this <values> tag and I can't modify the server response. Is there any way I can read my server response using xml reader?? or can i parse my xml response somehow OR modify it on client side before reading ??
Any help is appreciated... Thanks
I have an Xml response from server like,
<properties>
<property id=”123” name=”p1”>
<value name=”v1” attrb1=”12” />
<value name=”v3” attrb1=”12” />
<value name=”v4” attrb1=”12” />
</property>
<property id=”13” name=”p2”>
<value name=”v2” attrb1=”12” />
</property>
<properties>
I understand that using 'hasMany' config I can store the xml data into two models (say, Property & Value),only if the value elements are inside a <values> </values> tag. For example,
<property id=”123” name=”p1”>
<values>
<value name=”v1” attrb1=”12” />
<value name=”v3” attrb1=”12” />
<value name=”v4” attrb1=”12” />
</values>
</property>
But, my server response doesn't have this <values> tag and I can't modify the server response. Is there any way I can read my server response using xml reader?? or can i parse my xml response somehow OR modify it on client side before reading ??
Any help is appreciated... Thanks