AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

MgByteReader* MgResourceService::GetResourceContent ( MgResourceIdentifier resource  ) 

Gets the content of the specified resource.

.NET Syntax
MgByteReader GetResourceContent(MgResourceIdentifier resource);
Java Syntax
MgByteReader GetResourceContent(MgResourceIdentifier resource);
PHP Syntax
MgByteReader GetResourceContent(MgResourceIdentifier resource);

Parameters:
resource (MgResourceIdentifier) Resource identifier specifying the resource.
Returns:
Returns an MgByteReader object containing the resource content in XML format. The XML uses the schema appropriate for the resource type. See XML Schemas .
Example (PHP)
 // Assuming $resourceService has already been initialized
 $resourceID = new MgResourceIdentifier("Library://Geography/World.MapDefinition");
 $byteReader = $resourceService->GetResourceContent($resourceID);

Exceptions:
MgInvalidRepositoryTypeException 
MgInvalidRepositoryNameException 
MgInvalidResourcePathException 
MgInvalidResourceNameException 
MgInvalidResourceTypeException 
See also:
SetResource