Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gentran Mapping Qn

Status
Not open for further replies.

rms78

Programmer
Apr 28, 2002
1
SG
Hi All,
Hope that u can help me with this problem..

I have a XML document that i need to produce with empty tags ie.
<Status/>.. i can do it by using the code in the extended rules as
below :

writeBlock(&quot;<Status/>&quot;);
writeBlock(&quot;^0D^0A&quot;);
empty(#Status);

it is working fine as long as there is data before the Status tag..
sample output :
<Route>
<Sender>
<LocationID>1234</LocationID>
</Sender>
<Receiver>
<LocationID>5566</LocationID>
</Receiver>
</Route>
<GoodsShipped>
<test>123</test>
<Status/>
<OrderNo>21104731</OrderNo>
</GoodsShipped>


but if i don't have data in the tag before the Status tag, it will
end up appearing like this :
<Route>
<Sender>
<LocationID>1234</LocationID>
</Sender>
<Receiver>
<LocationID>5566</LocationID>
</Receiver>
</Route>
<Status/> <--------- this is wrong...
<GoodsShipped>
<--------- shd be here !!!!

<OrderNo>21104731</OrderNo>
</GoodsShipped>
how do i get it to be inside the GoodsShipped tag ????

Thanks for your help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top