If you misplace your xml declaration,
<?xml version="1.0" ?>
some type of warning or error should be generated as this is a badly formed XML document. At the moment, it appears that the rest of the document is silently ignored.
Probably the best thing to do would be to issue a warning and ignore the spurious declaration above.