Bug/inconvenience with FormatXML -> ComposeXML

Everything else that doesn't fall into one of the other PB categories.
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Bug/inconvenience with FormatXML -> ComposeXML

Post by jacdelad »

Hi,
I don't know if this is intentional, but when I use ComposeXML with the #PB_XML_NoDeclaration flag I get two empty lines (the first line would usually contain the declaration):

Code: Select all

#XML = ~"<?xml version=\"1.0\" encoding=\"utf-8\"?><Nothing><StillNothing></StillNothing></Nothing>"

ParseXML(0,#XML)
FormatXML(0,#PB_XML_ReFormat|#PB_XML_CutNewline)
Debug ComposeXML(0,#PB_XML_NoDeclaration)
While I know I can remove them by myself, I feel like this flag should return the plain data without trailing blank lines.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD