Web API Reference MapGuide Open Source

MgByteReader* MgResourceService::GetResourceContent MgResourceIdentifier resource  )  [inherited]
 

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