EDI to XML - alternative to 'component'?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

EDI to XML - alternative to 'component'?

Smooks User
Hello,

I have a segment as follows:

SEG*username*firstname*lastname*state

I need to produce an XML output as follows:

<UserDetails>
<Username>username</Username>
<Custom>
   <Name>
         <Firstname>firstname</FirstName>
         <Lastname>lastname</LastName>
    </Name>
</Custom>
<State>state</State>
</UserDetails>

My question is it possible to have above structure when I do not have a delimiter like ^ for component.
I have same delimiter * for entire segment. Do we have any alternative for this in Smooks EDI?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: EDI to XML - alternative to 'component'?

Ted Lum-2
Look at the xml-to-xml example. I think you're going to need to
transform the input schema, which I assume you have no control over, to
the desired output schema. You could also try a visitor, that might be
lighter weight.

On 2/19/2015 1:24 PM, Smooks User wrote:

> Hello,
>
> I have a segment as follows:
>
> SEG*username*firstname*lastname*state
>
> I need to produce an XML output as follows:
>
> <UserDetails>
> <Username>username</Username>
> <Custom>
>     <Name>
>           <Firstname>firstname</FirstName>
>           <Lastname>lastname</LastName>
>      </Name>
> </Custom>
> <State>state</State>
> </UserDetails>
>
> My question is it possible to have above structure when I do not have a
> delimiter like ^ for component.
> I have same delimiter * for entire segment. Do we have any alternative for
> this in Smooks EDI?
>
> Thanks
>
>
>
> --
> View this message in context: http://milyn.996300.n3.nabble.com/EDI-to-XML-alternative-to-component-tp8992.html
> Sent from the milyn - dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email