Class RdfXmlParser
Parser for RDF/XML syntax.
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class RdfXmlParser : IRdfReader, ITraceableParser
  Constructors
| Edit this page View SourceRdfXmlParser()
Creates a new RDF/XML Parser.
Declaration
public RdfXmlParser()
  RdfXmlParser(RdfXmlParserMode)
Creates a new RDF/XML Parser which uses the given parsing mode.
Declaration
public RdfXmlParser(RdfXmlParserMode mode)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RdfXmlParserMode | mode | RDF/XML Parse Mode.  | 
      
Fields
| Edit this page View SourceXmlReaderSettings
Get the settings to pass through to the underlying XML parser used when parsing in streaming mode.
Declaration
public readonly XmlReaderSettings XmlReaderSettings
  Field Value
| Type | Description | 
|---|---|
| XmlReaderSettings | 
Properties
| Edit this page View SourceTraceParsing
Controls whether Parser progress will be traced by writing output to the Console.
Declaration
public bool TraceParsing { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
Methods
| Edit this page View SourceLoad(IGraph, StreamReader)
Reads RDF/XML syntax from some Stream into the given Graph.
Declaration
public void Load(IGraph g, StreamReader input)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | g | Graph to create Triples in.  | 
      
| StreamReader | input | Input Stream.  | 
      
Load(IGraph, TextReader)
Reads RDF/XML syntax from some Input into the given Graph.
Declaration
public void Load(IGraph g, TextReader input)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | g | Graph to create Triples in.  | 
      
| TextReader | input | Input to read from.  | 
      
Load(IGraph, string)
Reads RDF/XML syntax from some File into the given Graph.
Declaration
public void Load(IGraph g, string filename)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | g | Graph to create Triples in.  | 
      
| string | filename | Filename of File containg XML/RDF.  | 
      
Remarks
Simply opens a Stream for the File then calls the other version of Load to do the actual parsing.
Load(IGraph, XmlDocument)
Reads RDF/XML from the given XML Document.
Declaration
public void Load(IGraph g, XmlDocument document)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | g | Graph to load into.  | 
      
| XmlDocument | document | XML Document.  | 
      
Load(IRdfHandler, StreamReader)
Reads RDF/XML syntax from some Stream using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, StreamReader input)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | handler | RDF Handler to use.  | 
      
| StreamReader | input | Input Stream.  | 
      
Load(IRdfHandler, StreamReader, IUriFactory)
Reads RDF/XML syntax from some Stream using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, StreamReader input, IUriFactory uriFactory)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | handler | RDF Handler to use.  | 
      
| StreamReader | input | Input Stream.  | 
      
| IUriFactory | uriFactory | URI Factory to use.  | 
      
Load(IRdfHandler, TextReader)
Reads RDF/XML syntax from some Input using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, TextReader input)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | handler | RDF Handler to use.  | 
      
| TextReader | input | Input to read from.  | 
      
Load(IRdfHandler, TextReader, IUriFactory)
Reads RDF/XML syntax from some Input using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, TextReader input, IUriFactory uriFactory)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | handler | RDF Handler to use.  | 
      
| TextReader | input | Input to read from.  | 
      
| IUriFactory | uriFactory | URI factory to use.  | 
      
Load(IRdfHandler, string)
Reads RDF/XML syntax from a file using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, string filename)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | handler | RDF Handler to use.  | 
      
| string | filename | File to read from.  | 
      
Load(IRdfHandler, string, IUriFactory)
Method for Loading RDF using a RDF Handler from some Concrete RDF Syntax from a given File.
Declaration
public void Load(IRdfHandler handler, string filename, IUriFactory uriFactory)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | handler | RDF Handler to use.  | 
      
| string | filename | The Filename of the File to read from.  | 
      
| IUriFactory | uriFactory | URI factory to use.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| RdfException | Thrown if the Parser tries to output something that is invalid RDF.  | 
      
| RdfParseException | Thrown if the Parser cannot Parse the Input.  | 
      
| IOException | Thrown if the Parser encounters an IO Error while trying to access/parse the Stream.  | 
      
ToString()
Gets the String representation of the Parser which is a description of the syntax it parses.
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| string | 
Overrides
Events
| Edit this page View SourceWarning
Event which Readers can raise when they notice syntax that is ambigious/deprecated etc which can still be parsed
Declaration
public event RdfReaderWarning Warning
  Event Type
| Type | Description | 
|---|---|
| RdfReaderWarning |