Closed vunguyen7797 closed 1 year ago
I am trying to obtain this format in the ouput:
<gpx version="1.1" creator="dart-gpx library" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxacc="http://www.garmin.com/xmlschemas/AccelerationExtension/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v2 http://www.garmin.com/xmlschemas/TrackPointExtensionv2.xsd http://www.garmin.com/xmlschemas/AccelerationExtension/v1 http://www.garmin.com/xmlschemas/AccelerationExtensionv1.xsd" />
However, I still couldn't find out away to add a newline before adding each attribute. All the attributes of the elements seem always be on the same line. Is there anyway available to achieve this?
Use indentAttribute when pretty-printing, see toXmlString.
indentAttribute
I am trying to obtain this format in the ouput:
However, I still couldn't find out away to add a newline before adding each attribute. All the attributes of the elements seem always be on the same line. Is there anyway available to achieve this?