Firstly, export an xml file from my PDF form(by function xfa.host.exportData("",0);), however, when open it by xml editor or Windows writing board, it shows an extra CRLF after every item's name, please see below:
<?xml version="1.0" encoding="UTF-8"?>
How can I remove them to make the xml file like this(see below):
You could use Notepad++ with the XML Tools plugin. It has many pretty print options. Opening the XML file in a browser will display it like a pretty print as well.
Is there a reason why you need to pretty the XML up. Is it just to make it easer to read with the human eye or have you found some other problem? It's never caused me a problem as it is still valid XML when processed by a XML parser.