Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6940

tokenize xml for splitter throwing org.xml.sax.SAXParseException; XML documents structures must start and end within the same entity.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.12.1
    • 2.11.3, 2.12.2, 2.13.0
    • camel-core
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              ay Akitoshi Yoshida
              Cecilio Alvarez Cecilio Alvarez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: