exceptionfactory commented on PR #6054:
URL: https://github.com/apache/nifi/pull/6054#issuecomment-1136579832

   > @exceptionfactory, I tried to address the special case on the start 
document element with XMLStreamWriter and not having much luck there as well. I 
am wondering if as an alternative approach, since most comparisons of these 
flow xml in tests are done using string comparison, what if we ignore the 
starting `<xml ...?>` in the test comparisons by taking the 
`s.substring(s.indexof(System.getProperty("line.separator") + 1)`. That way the 
only thing that would be compared in the string comparison is everything after 
the opening tag. Let me know your thoughts.
   
   Thanks for following up @emiliosetiadarma. Ignoring XML declaration sounds 
reasonable for tests. Using the `System.lineSeparator()` method sounds like it 
could work, as long as the output has a newline, which seems to be case for 
most tests.


-- 
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]

Reply via email to