[
https://issues.apache.org/jira/browse/NIFI-9832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Gyori updated NIFI-9832:
------------------------------
Status: Patch Available (was: In Progress)
> XMLReader: XML element's content disappears if the element has attribute
> ------------------------------------------------------------------------
>
> Key: NIFI-9832
> URL: https://issues.apache.org/jira/browse/NIFI-9832
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Peter Gyori
> Assignee: Peter Gyori
> Priority: Major
> Labels: reader, xml
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Let's use a ConvertRecord processor with an XMLReader and an
> XMLRecordSetWriter to process XML documents.
> XMLReader controller service settings:
> * Schema Access Strategy: Infer Schema
> * Expect Records as Array: false
> XMLRecordSetWriter controller service settings:
> * Schema Access Strategy: Inherit Record Schema
> ConvertRecord processor settings:
> * Record Reader: XMLReader
> * Record Writer: XMLRecordSetWriter
> Input data:
> {code:java}
> <record>
> <num>123</num>
> <software favorite="true">Apache NiFi</software>
> </record> {code}
> Output:
> {code:java}
> <record>
> <num>123</num>
> <software>
> <favorite>true</favorite>
> <value></value>
> </software>
> <favorite></favorite>
> </record> {code}
> The value "Apache NiFi" is lost.
> (The issue of the additional "favorite" xml element is covered in
> https://issues.apache.org/jira/browse/NIFI-9831)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)