// ================================================== // Methods public void SetVersion(GpxSchemaVersion version) { if (_xml != null) { throw new Exception("Header already written."); } else { Version = version; } }
private void InitXml() { // check for file version _ns = new XmlNamespaceManager(_xml.NameTable); if (_xml.DocumentElement.FirstChild.Name == "metadata") { _version = GpxSchemaVersion.Version1_1; _ns.AddNamespace("gpx", OrthoConstants.GpxNamespaceV1_1); } else { _version = GpxSchemaVersion.Version1; _ns.AddNamespace("gpx", OrthoConstants.GpxNamespaceV1); } }