Expand my Community achievements bar.

Extra CRLF in XML file, how can I remove it?

Avatar

Level 2

Hi,

I met a problem in my PDF form now.

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"?>

<f1

><sf

><Cloud_Key

>VH-QS-1V-KV-ff03</Cloud_Key

><SSID

>WPAEnt</SSID

><PWD

>$WPA2_ENT_TEST$</PWD

><IS_EXP

>0</IS_EXP

><IS_DHCP

>1</IS_DHCP

><IP_ADD

/><IP_SUBM

/><IP_DFG

/><IP_DNS

/></sf

></f1

>

 

How can I remove them to make the xml file like this(see below):

<?xml version="1.0" encoding="UTF-8"?>

<f1>

  <sf>

<Cloud_Key>VH-QS-1V-KV-ff03</Cloud_Key>

<SSID>testoSaveris</SSID>

<PWD>tgmSidCW2020</PWD>

<IS_EXP>0</IS_EXP>

<IS_DHCP>1</IS_DHCP>

<IP_ADD/>

<IP_SUBM/>

<IP_DFG/>

<IP_DNS/>

  </sf>

  </f1>

Waiting for your help, thank you!

3 Replies

Avatar

Level 2

Can everybody help me? Please~~

Avatar

Level 10

Hi,

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.

Regards

Bruce

Avatar

Level 2

Thank you Bruce!

Yes, there is a very important reson for me to make the xml in a correct format, because my device can't decode xml file well if the xml code has the wrong CRLF position.

Best regards

Enlly