Entity Repl Preemitter (com.ibi.preemit.XDEntityRepl)

How to:

Syntax:

com.ibi.preemit.XDEntityRepl

Description:

This preemitter eliminates XML entities (such as &lt. to < and &gt to >). It returns an XML formatted document.

Use the Entity Repl Preemitter if one XML document is enclosed inside another XML document using &lt; and &gt; characters, then the user can convert the enclosed XML document to XML representation using entity Repl preemitter.

Parameters:

Parameter

Description

Name

Name of the new Preemitter object definition.

Description

Description for the new Preemitter object definition.



x
Procedure: How to Use an Entity Repl Preemitter
  1. Select an Entity Repl Preemitter from the list.
  2. Click Next.

    The Name and Description pane opens.

  3. Provide a name and optionally, a description for the preemitter and click Finish. Name the preemitter EntityRepl.

    After you add the EntityRepl preemitter to iWay Service Manager, create an outlet, PreemitterOutlet and add the EntityRepl to this outlet.

    Construct the channel PreemitChannel using a file listener case1 as inlet, a simple move route and the outlet created in the previous step as shown in the following process.

    Let the input to this channel be a.xml.

    <?xml version="1.0" encoding="ISO-8859-1" ?><eda><error timestamp="2009-04-02T20:53:55Z"
    source="Parser" code="3" stage="PARSE">Parser error in XML file: XD[FAIL] cause: 0 
    subcause: 0 message: Problems parsing XML file: XD[FAIL] cause: 0 subcause: 0 message:
    Parse failure ®) 3: org.xml.sax.SAXParseException: The markup in the document following the
    root element must be well-formed. (&lt;/c&gt;
    &lt;/b&gt;
    &lt;b&gt;
    &lt;c&gt;two&lt;/c&gt;
    &lt;/b&gt;
    &lt;/a&gt;)<data type="xml">&lt;a&gt;
    &lt;b&gt;
    &lt;c&gt;one&lt;/c&gt;
    &lt;/b&gt;
    &lt;b&gt;
    &lt;c&gt;two&lt;/c&gt;
    &lt;/b&gt;
    &lt;/a&gt;</data></error></eda>

    The output obtained is a file with &lt;b&gt replaced with XML notation <and>. -a.2009-04-29T17_34_41.324Z.xml is:

    <?xml version="1.0" encoding="ISO-8859-1" ?><eda><response 
    errorcount="0"><timestamp>2009-04-29T17:34:41Z</timestamp></response></eda>


iWay Software