only escape characters xml need to be escaped #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
as I mentioned at #73 , escape
/n/t
is not necessary. These words is allowed to be saved at XML。After merge this pr
/t/n
will show it origin characterswhen developer read a xml
doc
OutputXML
will give developer as it was, and it comply with xml specificationbefore this pr was merge ,
OutputXML
will give human unreadable like this:<?xml version=\"1.0\" encoding=\"utf-8\"?><class_list xml:space=\"preserve\">
		<student>
			<name> Robert </name>
			<grade>A+</grade>

		</student>
	</class_list>
fix some xml never get origin plain text
before this pr, we need call
html.UnescapeString
to print the origin plain textbut there is some xml you may never get origin plain text by
html.UnescapeString
like this xml belowyou either get plain text
<?xml version=\"1.0\" encoding=\"utf-8\"?><class_list xml:space=\"preserve\">
		<student>
			<name> Robert </name>
			<grade>A+</grade>

		</student>
	</class_list>
byOutputXML
.or get
<?xml version=\"1.0\" encoding=\"utf-8\"?><example xml:space=\"preserve\"><word>0\t\t</word></example>
byOutputXML
+html.UnescapeString
. None of them are consistent with the original document