I was wording how I could reorder the tag Rice:
- Move the tag
<Rice>long-grain</Rice>to down and ***<Rice>123</Rice>***to up; - Remove the third tag
<Rice>or remove it in case it is empty like<Rice/>using XSLT:
//Original XML
<Company>
<FarmName addressID="123465789">
<Name xml:lang="en">Main Farm</Name>
<Details>
<Milk>Jodie Forster</Milk>
<Bajra>ESRKSC</Bajra>
<Rice>long-grain</Rice> //move to down
<Rice>123</Rice> // move to up
<Rice/> //remove if it is empty
<Jowar>852</Jowar>
<Lobia>WW</Lobia>
<Maize>5240</Maize>
<Masoor isoCode="US">123</Masoor>
</Details>
<Email>[email protected]</Email>
<Phone>
<TelephoneNumber>
<AreaOrCityCode/>
<Number>123456789<Number/>
</TelephoneNumber>
</Phone>
</FarmName>
</Company>
//Desire XML
<Company>
<FarmName addressID="123465789">
<Name xml:lang="en">Main Farm</Name>
<Details>
<Milk>Jodie Forster</Milk>
<Bajra>ESRKSC</Bajra>
<Rice>123</Rice>
<Rice>long-grain</Rice>
<Jowar>852</Jowar>
<Lobia>WW</Lobia>
<Maize>5240</Maize>
<Masoor isoCode="US">123</Masoor>
</Details>
<Email>[email protected]</Email>
<Phone>
<TelephoneNumber>
<AreaOrCityCode/>
<Number>123456789<Number/>
</TelephoneNumber>
</Phone>
</FarmName>
</Company>
Thanks