Skip to Content

XML is desplayed in one line

Dec 12, 2017 at 09:27 AM


avatar image
Former Member


I have to create an XML file that i have to send using FTP. but before that i'm testing it by exporting it to my local desktop.

My problem is when i open the .xml file i find it displayed in one line (using Code Writer)

but when i open it with internet explorer it is shown properly so my question is when i'll send it using FTP will it be also in one line or not ?

If so, how can i correct that ?

Thanks in advance.

Best regards

10 |10000 characters needed characters left characters exceeded

Google for whitespaces in XML?

Former Member

Thank you

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mike Pokraka Dec 12, 2017 at 02:16 PM

XML doesn't care about line breaks. Some tools create XML with line breaks to make it more readable, others don't. Some display tools (Internet Explorer) will insert line breaks for display, others don't because you might want to see the real data.

No idea about Code Writer, but in Notepad++ and TextWrangler for example you have an explicit commands to insert line breaks.

But as far as the content is concerned it's irrelevant. Except for stuff in CDATA tags where line breaks are part of the content. There may be other subtleties I am not aware of.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you for your explanation