pgyori commented on code in PR #5964:
URL: https://github.com/apache/nifi/pull/5964#discussion_r856323201
##########
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLReader.java:
##########
@@ -106,12 +107,27 @@ public class XMLReader extends SchemaRegistryService
implements RecordReaderFact
.required(false)
.build();
+ public static final PropertyDescriptor PARSE_XML_ATTRIBUTES = new
PropertyDescriptor.Builder()
+ .name("parse_xml_attributes")
+ .displayName("Parse XML Attributes")
+ .description("When 'Schema Access Strategy' is 'Infer Schema' and
this property is 'true' then XML attributes are parsed and " +
+ "added to the record as new fields. When the schema is
inferred but this property is 'false', " +
+ "XML attributes and their values are ignored.")
+ .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+ .allowableValues("true", "false")
+ .defaultValue("true")
+ .required(false)
+ .dependsOn(SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY, INFER_SCHEMA)
+ .build();
+
+ private volatile boolean parseXMLAttributes;
private volatile String dateFormat;
private volatile String timeFormat;
private volatile String timestampFormat;
@OnEnabled
public void onEnabled(final ConfigurationContext context) {
+ this.parseXMLAttributes =
context.getProperty(PARSE_XML_ATTRIBUTES).asBoolean();
Review Comment:
Fixing in my next commit. Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]