It should be possible to create a org.w3c.dom.Document from a GPX object and vice versa.
// Writing a 'GPX' object to a 'Document'.
void GPX.Writer::write(final GPX gpx, final DOMResult output);
// Reading a 'GPX' object from a 'Document'.
GPX GPX.Reader::read(Document input);
It should be possible to create a
org.w3c.dom.Document
from aGPX
object and vice versa.