You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/02 11:52:20 UTC

[GitHub] [nifi] pgyori edited a comment on pull request #5896: NIFI-9832: Fix disappearing XML element content when the element has attribute

pgyori edited a comment on pull request #5896:
URL: https://github.com/apache/nifi/pull/5896#issuecomment-1077839842


   This fix solves the issue of the disappearing XML element value, and is in accordance with the current implementation of converting this:
   `<record>
     <num>123</num>
     <software favorite="true">Apache NiFi</software>
   </record>`
   to this:
   `<record>
     <num>123</num>
     <software>
       <favorite>true</favorite>
       <value>Apache NiFi</value>
     </software>
   </record>`
   that is: the XML attribute is moved to an XML element (record field in NiFi) and the content is moved to an element (field) named "value".
   
   However, this fix does not solve the issue that emerged with the introduction of the above logic, which is: if the XML element that has an attribute already has a child element named "value", the content of that gets overwritten:
   `<record>
     <num>123</num>
     <software favorite="true">Apache <value>something</value>NiFi</software>
   </record>`
   Output:
   `<record>
     <num>123</num>
     <software>
       <favorite>true</favorite>
       <value>Apache NiFi</value>
     </software>
   </record>`
   the value "something" is lost.


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org