Page 1 of 1

xml output format issue

Posted: Fri Mar 03, 2006 8:26 am
by scorpion
hi all,

i am getting some issue in output format in xml file.
i am trying to generate an xml output file from .csv file.

1. If Type and Description are distinct then the output xml is as follows:

<root>
<ApplicationPrincipals>
<Name>JNewton</Name>
<Description></Description>
<Type>1</Type>
</ApplicationPrincipals>
<ApplicationPrincipals>
<Name>Jhoover</Name>
<Description></Description>
<Type>2</Type>
</ApplicationPrincipals>
</root>

2. If Type and Description are same then the output xml is as follows:

<root>
<ApplicationPrincipals>
<Name>JNewton</Name>
<Name>Jhoover</Name>
<Description></Description>
<Type>1</Type>
</ApplicationPrincipals>
</root>

but i need the output for same records also like in distinct(1) situation.

<root>
<ApplicationPrincipals>
<Name>JNewton</Name>
<Description></Description>
<Type>1</Type>
</ApplicationPrincipals>
<ApplicationPrincipals>
<Name>Jhoover</Name>
<Description></Description>
<Type>2</Type>
</ApplicationPrincipals>
</root>

can any one helpme on this..

thanks in advance..

Posted: Wed Mar 08, 2006 3:00 am
by Kirtikumar
Try the following -

Define a column dummy in ur output which should have XPath as
\root\ApplicationPrincipals\

Note that there is no text() in the XPath.

do post the outcome..