Harbs commented on issue #947:
URL: https://github.com/apache/royale-asjs/issues/947#issuecomment-732071666


   There's two places it's used during parsing. One on line 571:
   `var xmlStr:String = ignoreWhitespace ? trimXMLWhitespace("" + xml) : "" + 
xml;`
   and a second time on line 637:
   `if (ignoreWhitespace) xml = trimXMLWhitespace( xml) ;`
   
   I cannot see a case where the first one is needed at all. I think the second 
time is always called.
   
   I commented out both cases and XML tests pass with no errors.
   
   We probably do need to strip out whitespace when parsing XML if 
`ignoreWhitespace` is true, but the way we're doing it is very simplistic and 
I'm not sure it's going to work. I'm not sure what the best way is though. 
Walking the tree and stripping out the whitespace after it's parsed is an 
expensive way of doing it and I don't see a way of stripping whitespace while 
parsing using `DOMParser`. We definitely do need unit tests for these cases 
either way...


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to