0

Trying to convert EDI-to-xml through smooks. while converting to smooks xml there is some problem with field separator.

<medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.4.xsd">

    <medi:description name="Invoice" version="1.0"></medi:description>

    <medi:delimiters segment="~" field="<" component="^" sub-component="~"/>

... ... EDI file format is like: ...

SE<17<340001~
GE<4<34~

... Here field separator is '<'. above code is working for other symbols except this. But when I use '<' giving error as below.

ERROR:[09-29-2014 04:05:07 PM]:[org.mule.exception.AbstractExceptionListener:267]:
Caught exception in Exception Strategy: Unable to filter InputStream for target profile [org.milyn.profile.Profile#default_profile].
org.milyn.SmooksException: Unable to filter InputStream for target profile [org.milyn.profile.Profile#default_profile].
        at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
        at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
        at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
        at org.milyn.Smooks._filter(Smooks.java:516)
        at org.milyn.Smooks.filterSource(Smooks.java:475)......
.....
...
Caused by: org.milyn.edisax.EDIConfigurationException: Error parsing EDI Mapping Model [<?xml version="1.0" encoding="UTF-8"?>
Nomad
  • 751
  • 4
  • 13
  • 34
  • It seems like a dangerous delimiter to use, considering the XML nature of the application involved. Also, wouldn't you run into trouble with the segment and sub-component being the same delimiter? – Andrew Sep 29 '14 at 20:53
  • 1
    Don't know anything about smooks, but in an XMl document you must escape the `<` character as `<`. – michael.hor257k Sep 29 '14 at 20:58

1 Answers1

0
&lt; worked for me.

Some other escape characters
"   &quot;
'   &apos;
<   &lt;
>   &gt;
&   &amp;
Nomad
  • 751
  • 4
  • 13
  • 34