Cecilio Alvarez created CAMEL-6940:
--------------------------------------

             Summary: tokenize xml for splitter throwing 
org.xml.sax.SAXParseException; XML documents structures must start and end 
within the same entity. 
                 Key: CAMEL-6940
                 URL: https://issues.apache.org/jira/browse/CAMEL-6940
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.12.1
            Reporter: Cecilio Alvarez


When trying to split a xml containing this:
<tag name=name/>
I encountered the following exception : org.xml.sax.SAXParseException; XML 
documents structures must start and end within the same entity. 

Extract from my route:
the input is:

<BOOKS>
            <LIBRARY name=Library1/>
                      <BOOK name=Book1/>  <-----this kind of tag doesn't work.
                      <BOOK name=Book2/>
            </LIBRARY>
            <LIBRARY name=Library2/>
                      <BOOK name=Book1></BOOK>   <---this works.
                      <BOOK name=Book2></BOOK>
            </LIBRARY>
</BOOKS>


The splitting route:
<route>
<from uri="activemq:queue.TEST"/>
<choice> 
        <when> 
                <xpath>/BOOKS</xpath> 
                <split streaming="true">
                        <tokenize token="LIBRARY" xml="true"/>
                        <to uri="activemq:example.LIBRARY"/>
                </split>
        </when> 
        <otherwise> 
                <log message="Not a Books xml."/> 
        </otherwise>       
</choice>
</route>

This issue is not part of camel 2.11.0.




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to