Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Tim MeagherHi,
The missing newlines shouldn't have an impact on the Tabular XML File node.
I'm not sure what the problem you're running into there is - maybe someone else has a better idea - in order to figure it out more I'd probably need some representative data sample.
In any case, with the XML Data node, if I understood correctly, you should be able to get what you want.
If you have XML like:
<top>
<element name="somethingToIgnore"/>
<record>
<name>John</name>
<address>12 something street</address>
<city name="New York"/>
<country>US</country>
</record>
<record>
...
</record>
...
<otherElement>
<otherSubElement attr="true"/>
...
</otherElement>
</top>
And the only fields you are interested in are those within the record element under the top element, then you can just rename the Data output to "top.record" and set the "UnmappedFieldBehavior" parameter to "Ignore", then this will do what you want and ignore everything under "otherElement" and "someElement".
If however, you wanted only to get for instance the top.record.name, and top.record.address fields all on the one output, and ignore everything else under top.record (where you don't know what everything else could be), then this is not currently possible.
I believe there is already an enhancement request for this sort of functionality, if not, I'll make sure one gets added.
If, in the above case, you do know which fields you do want to ignore (e.g. top.record.city and top.record.country from the example above), then you can just create additional outputs on the node called "top.record.country" and "top.record.city" - along with the "top.record" output and set the "UnmappedFieldBehavior" parameter to ignore.
There will still be data produced for the top.record.country and top.record.city outputs in this case, but you can then just ignore those outputs.
Does this solve the problem for you?
Tim.