Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • If the xpath evaluates to array for a xml record, it will throw runtime exception. Eg: For the below xml record if the user gives the xpath as  /Cities /City it will result in runtime exception, which will be handled in the way specified by the user.

    Code Block
    languagexml
    <Cities>
        <City>Paris</City>
        <City>Lyon</City>
        <City>Marseille</City>
     </Cities>
  • If the xpath evaluates to a node which contains child node, the plugin will return the node along with all its children as a single xml node string.This is done so that the plugin returns valid xml event for every input structured record.

    Eg: For the below xml record if the user gives the xpath as  /Book/author, the plugin will return the xml event - 

               "<author><name>Dan Brown</name><location>U.S.A</location><author>".

    Code Block
    languagexml
    <Book>
        <title>Angels & Demons</title>
        <author>
    		<name>Dan Brown</name>
    		<location>U.S.A</location>
        </author>
     </Book>
  • Eg: For the below xml record if the user gives the xpath as  /Cities /City it will result in runtime exception, which will be handled in the way specified by the user.

  • If user chooses to write error to dataset the error record will be emitted using the emitter.emitError() available in transform().
  • The fieldName specified in "xpathMappings" and "fieldTypeMapping" should exactly match each other.(This will be validated during configurePipeline())
  • The schema for all fields will be of type nullable, since the xpath can evaluate to null if the expression is not satisfied by a node.

...