Skip to content

SVGraph_FormatXML()

CapnOdin edited this page Nov 6, 2016 · 2 revisions

Formats XML for readability.

SVGraph_FormatXML(XML)

Parameters

XML

The XML string that will be formatted.

Remarks

Some browsers won't be able to show XML files with very long lines, hence why this function is necessary.

Example

Non-formatted

<svg xmlns="http://www.w3.org/2000/svg" id="svg" width="700" height="365"><filter id="dropShadow"><feGaussianBlur in="SourceAlpha" stdDeviation="3" /><feMerge><feMergeNode /><feMergeNode in="SourceGraphic" /></feMerge></filter><g id="axes" transform="translate(40 40)">...

Formatted

<svg xmlns="http://www.w3.org/2000/svg" id="svg" width="700" height="365">
	<filter id="dropShadow">
		<feGaussianBlur in="SourceAlpha" stdDeviation="3" />
		<feMerge>
			<feMergeNode />
			<feMergeNode in="SourceGraphic" />
		</feMerge>
	</filter>
	<g id="axes" transform="translate(40 40)">
		...