I know a normal xml file have indentation and space, like:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<child foo="bar"></child>
</root>
</xml>
but if I write it in a single line like
<?xml version="1.0" encoding="UTF-8"?><root><child foo="bar"></child></root></xml>
does it count a xml file?
if it’s a rss feed xml, the reader can read it correctly?
Generally, indentation is optional. There are complex rules as to whether indentation is significant, that is, whether the whitespace changes the information content of the XML message. For purposes of validation against a DTD or XSD schema, indentation is ignored if it occurs in an element with “element-only content”, but not if it occurs in an element with “mixed content”. If you are processing using XSLT 2.0 or XQuery, the same rule affects whether the indentation whitespace is seen by your application or not. But with lower-level parsing interfaces, your application will always be notified of the whitespace, and must make its own decision about whether to ignore it or not.