Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 1
EllieMohr
Level 1

Likes

0 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
EllieMohr
Level 1

Likes

0 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
EllieMohr
Level 1

24-10-2016

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!

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
EllieMohr
Level 1

Likes

0 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
EllieMohr
Level 1

Likes

0 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
EllieMohr
Level 1

25-10-2016

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

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

25-10-2016

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

Avatar
Validate 1
Level 1
EllieMohr
Level 1

Likes

0 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
EllieMohr
Level 1

Likes

0 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
EllieMohr
Level 1

24-10-2016

Can everybody help me? Please~~