Public Shared Function FromXml( _ ByVal xmlString As String _ ) As SpatialReference
public static SpatialReference FromXml( string xmlString )
Parameters
- xmlString
- XML string representation of a SpatialReference.
Public Shared Function FromXml( _ ByVal xmlString As String _ ) As SpatialReference
public static SpatialReference FromXml( string xmlString )
| Exception | Description |
|---|---|
| System.ArgumentNullException | The xmlString is empty or null. |
| ArcGIS.Core.Geometry.Exceptions.ProjectionEngineException | XML is invalid or does not represent a spatial reference string. |
{
SpatialReference srWithVertical = SpatialReferenceBuilder.CreateSpatialReference(4326, 6916);
string xml = srWithVertical.ToXml();
SpatialReference importedSR = SpatialReferenceBuilder.FromXml(xml);
// importedSR.Wkid = 4326
// importedSR.VcsWkid = 6916
string json = srWithVertical.ToJson();
importedSR = SpatialReferenceBuilder.FromJson(json);
// importedSR.Wkid = 4326
// importedSR.VcsWkid = 6916
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)