After very long discussions, on 10th of August, Tom Lane committed patch by Robert Haas:
Log Message: ----------- Extend EXPLAIN to support output in XML or JSON format. There are probably still some adjustments to be made in the details of the output, but this gets the basic structure in place. Robert Haas