[
https://issues.apache.org/jira/browse/NIFI-14788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18018172#comment-18018172
]
ASF subversion and git services commented on NIFI-14788:
--------------------------------------------------------
Commit b2163db4a8d4416b55590e8a4f2b5e3cef70c8f6 in nifi's branch
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b2163db4a8 ]
NIFI-14788 Fixed attribute prefix handling in XML Reader (#10267)
Signed-off-by: David Handermann <[email protected]>
> XMLReader's Attribute Prefix property does not work
> ---------------------------------------------------
>
> Key: NIFI-14788
> URL: https://issues.apache.org/jira/browse/NIFI-14788
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Gábor Gyimesi
> Assignee: Pierre Villard
> Priority: Major
> Attachments: Screenshot from 2025-08-22 04-01-42.png, Screenshot from
> 2025-08-22 04-02-03.png
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 'Attribute Prefix' property should set to a specific prefix for parsed
> attributes using the XMLReader controller service, when 'Parse XML
> Attributes' property is set to true, and the schema is inferred.
> Unfortunately when a prefix is set, it seems that the original attribute
> names are used and the value is set to null.
> Example with ConvertRecord processor using XMLReader as the record reader and
> JsonRecordSetWriter as record writer:
>
> Properties:
> Parse XML Attributes: true
> Attribute Prefix: attr_
> Field Name for Content: tagval
> Input:
> {code:java}
> <note>
> <to alias="Toto">Thomas Mills</to>
> </note>
> {code}
> Expected result:
> {code:java}
> [{"to":{"attr_alias":"Toto","tagval":"Thomas Mills"}}] {code}
> Actual result:
> {code:java}
> [{"to":{"alias":null,"tagval":"Thomas Mills"}}] {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)