[ 
https://issues.apache.org/jira/browse/NIFI-15378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048434#comment-18048434
 ] 

ASF subversion and git services commented on NIFI-15378:
--------------------------------------------------------

Commit 4f6a736f4bae83ca8ccb0ae1e87153557b61117c in nifi's branch 
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4f6a736f4b ]

NIFI-15378 Removed empty lines from formatted XML in Content Viewer

Co-authored-by: Pierre Villard <[email protected]>
Signed-off-by: Pierre Villard <[email protected]>

This closes #10711.


> UI XML Viewer (Formatted) doesn't behave as expected
> ----------------------------------------------------
>
>                 Key: NIFI-15378
>                 URL: https://issues.apache.org/jira/browse/NIFI-15378
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core UI
>            Reporter: Josef Zahner
>            Assignee: Pierre Villard
>            Priority: Minor
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> The UI XML Viewer doesn't work as intended for XML (at least for all NiFi 
> 2.x.x Versions). Please check the example below.
> h3. *Original XML File*
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <myMessage  xmlns="http://abc";>
>    <header>
>        <timeStamp>20251218145856Z</timeStamp>
>    </header>
> <responsePayload>
>  <ResponseRecord>
>    <recordNumber>0</recordNumber>
>    <recordPayload>
>          <myId>123456789</myId>
>    </recordPayload>
>  </ResponseRecord>
> </responsePayload>
>  
>            
>  
> </myMessage>
> {code}
> h3. *XML Pretty - created via Notepad++*
> What we would expect as output:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <myMessage xmlns="http://abc";>
>   <header>
>     <timeStamp>20251218145856Z</timeStamp>
>   </header>
>   <responsePayload>
>     <ResponseRecord>
>       <recordNumber>0</recordNumber>
>       <recordPayload>
>         <myId>123456789</myId>
>       </recordPayload>
>     </ResponseRecord>
>   </responsePayload>
> </myMessage>{code}
> h3. *What we get as "pretty" from the NiFi UI XML viewer*
> Btw. it's the same for the XML writer when pretty flag is enabled:
> {code:java}
> <myMessage xmlns="http://abc";>
>       
>   <header>
>             
>     <timeStamp>20251218145856Z</timeStamp>
>         
>   </header>
>   
>   <responsePayload>
>       
>     <ResponseRecord>
>           
>       <recordNumber>0</recordNumber>
>           
>       <recordPayload>
>                   
>         <myId>123456789</myId>
>             
>       </recordPayload>
>         
>     </ResponseRecord>
>     
>   </responsePayload>
>     
> </myMessage>
>  {code}
> h3. *Summary*
> What we have seen:
>  * Newlines/CR will not be removed.
>  * It's even worse, we are getting additional newlines after each line with 
> text
>  * XML Header will be removed
> So the UI for XML isn't helpful for us. Would be great if this output could 
> be improved in future releases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to