If we post the XML in a wordpress post, then it wont show properly. So we have to convert the <, > tags to HTML entities appropriately. If its a small XML, then we can do it easily, but if its a big one, then its somewhat tedious. I am using the below approach to handle this.
Access this online utility Free Formatter and convert the html tags with appropriate entities. Then add those snippet in the post surrounding with <pre><code> tags.
Please refer the below example,
<person> <name>bala</name> <age>90</age> </person>