No label after tags in order

HI, I have the following input:

<p>Hi <span>you</span></p> 

I would like to treat this as XML.

I run Tidy on the cmd line with the following parameters:

 input-xml: yes output-xml: yes indent: no 

My conclusion is this:

 <p>Hi <span>you</span></p> 

However, I wish I could not print xml. I would like him to respect all spaces and not add this line break. I can not find a way to output XML without beautiful printing. Does anyone know how to do this?

+4
source share
2 answers

I tried this and shared my observations, Aaron. Tydi does not seem to be able to satisfy your requirements. I suggest using a different tool.

0
source

I had the same problem. I found a possible solution and posted it on PHP Tidy removes spaces and inserts new lines

Summary: put <pre> -tags around the xml you want to restore, use output-html = true, then remove the <pre> -tags and newlines.

0
source

All Articles