Click or drag to resize

FileLoaderLoad Method (IRdfHandler, String)

Loads the contents of the given File using a RDF Handler providing the RDF format can be determined.

Namespace:  VDS.RDF.Parsing
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
public static void Load(
	IRdfHandler handler,
	string filename
)

Parameters

handler
Type: VDS.RDFIRdfHandler
RDF Handler to use.
filename
Type: SystemString
File to load from.
Remarks

The FileLoader first attempts to select a RDF Parser by examining the file extension to select the most likely MIME type for the file. This assumes that the file extension corresponds to one of the recognized file extensions for a RDF format the library supports. If this suceeds then a parser is chosen and will be used to attempt to parse the input.

Should this fail then the contents of the file will be read into a String, the StringParser is then used to attempt to parse it. The StringParser uses some simple rules to guess which format the input is likely to be and chooses a parser based on it's guess.

See Also