Click here to view all files
 
Helper method to generate an object from its XML representation, used to deserialize an object passed to a worker thread.

Namespace:  ESRI.ArcGISExplorer.Geometry
Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.900 (2.0.0.900)

Syntax

C#
public static Multipoint CreateFromXmlString(
	string xml
)
Visual Basic (Declaration)
Public Shared Function CreateFromXmlString ( _
	xml As String _
) As Multipoint

Parameters

xml
Type: System..::.String
The XML string from which the object is deserialized.

Return Value

A new object based on the XML representation.

Remarks

The CreateFromXmlString and ToXmlString methods are provided as helper methods to make the code for serializing and deserializing ArcGIS Explorer objects simpler than comparable code using the .NET framework IXmlSerializable interface (although the IXmlSerializable interface is available if you wish to use it).

Serialization of ArcGIS Explorer objects xml is used in a number of situations; when saving a map, and also when passing objects between the UI thread and a background worker thread.

Examples

This method demonstrates the simplest way to serialize and deserialize an Explorer object to an XML string, by using the ToXmlString and CreateFromXmlString methods.
CopyC#
// Create a new Point and serialize it to an XML representation.
ESRI.ArcGISExplorer.Geometry.Point ptObject1 = new ESRI.ArcGISExplorer.Geometry.Point();
string ptXml = ptObject1.ToXmlString();

// Create a second Point by deserializing the XML string to a new object.
ESRI.ArcGISExplorer.Geometry.Point ptObject2 = ESRI.ArcGISExplorer.Geometry.Point.CreateFromXmlString(ptXml);
CopyVB.NET
' Create a new Point and serialize it to an XML representation.
Dim ptObject1 As ESRI.ArcGISExplorer.Geometry.Point = New ESRI.ArcGISExplorer.Geometry.Point()
Dim ptXml As String = ptObject1.ToXmlString()

' Create a second Point by deserializing the XML string to a new object.
Dim ptObject2 As ESRI.ArcGISExplorer.Geometry.Point = ESRI.ArcGISExplorer.Geometry.Point.CreateFromXmlString(ptXml)

See Also

Relate Topics:
  AddPoint Method
  AddPoints Method
  Clone Method
  GetLabelPoint Method
  GetPoint Method
  GetPoints Method
  GetXmlSchema Method
  InsertPoint Method
  InsertPoints Method
  RemoveAllPoints Method
  RemovePointAt Method
  RemovePointsAt Method
  SetPoint Method
  SetPoints Method
  ToString Method
Created by Atop CHM to web converter,© 2009 all right reserved.