Reads RDF statements from an RDF/XML file.
The RdfXmlReader streams the statements to the StatementSink as they are read from the XML stream. The entire XML document will not be loaded into memory.
The following example reads a RDF/XML file from disk:
C# Example using (RdfReader data = new RdfXmlReader("filename.rdf")) { store.Import(data); }It is strongly recommended that you use one of the constructors that takes a Base URI argument, or else set the Base URI of the reader before reading statements from it, so that relative URIs found in the document can be interpreted. If a BaseURI has not been set and a relative URI is encountered, parsing the document will fail.
The stream is begun to be read as soon as the constructor is called. Any namespace declarations found on the document element of the RDF/XML document will be available in the RdfXmlReader.Namespaces property once the constructor returns. Once the document is fully read, all namespace declarations in the document are available in the RdfReader.Namespaces property and can be copied into the namespace manager of a SemWeb.RdfWriter using the NamespaceManager.AddFrom(NamespaceManager) method.
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.0, 1.0.6.2, 1.0.7.0
See Also: Inherited members from RdfReader.
⊟ Public Constructors
Creates a parser from a stream. Creates a parser from a TextReader. Creates a parser for a file. Creates a parser for an XML document already loaded. Creates a parser for an XmlReader. Creates a parser from a stream with the given base URI. Creates a parser from a TextReader with the given base URI. Creates a parser from a file with the given base URI. ⊟ Public Methods
overrideSelect (StatementSink) Documentation for this section has not yet been entered.⊟ Protected Methods
overrideDispose () Documentation for this section has not yet been entered.
⊟ RdfXmlReader Constructor
Creates a parser from a stream.
public RdfXmlReader (System.IO.Stream document)⊟ Parameters
- document
- The stream containing the RDF/XML file.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser from a TextReader.
public RdfXmlReader (System.IO.TextReader document)⊟ Parameters
- document
- The stream containing the RDF/XML file.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser for a file.
public RdfXmlReader (string file)⊟ Parameters
- file
- The path of the file containing RDF/XML, or "-" to read from Console.In.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser for an XML document already loaded.
public RdfXmlReader (System.Xml.XmlDocument document)⊟ Parameters
- document
- The RDF/XML document.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser for an XmlReader.
public RdfXmlReader (System.Xml.XmlReader document)⊟ Parameters
- document
- A stream containing the RDF/XML file.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser from a stream with the given base URI.
public RdfXmlReader (System.IO.Stream document, string baseUri)⊟ Parameters
- document
- The stream containing the RDF/XML file.
- baseUri
- The URI of the document itself, to be taken as the Base URI for relative URIs encoutered in the document.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser from a TextReader with the given base URI.
public RdfXmlReader (System.IO.TextReader document, string baseUri)⊟ Parameters
- document
- A TextReader containing the RDF/XML document.
- baseUri
- The URI of the document itself, to be taken as the Base URI for relative URIs encoutered in the document.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ RdfXmlReader Constructor
Creates a parser from a file with the given base URI.
⊟ Parameters
- file
- The path of the file containing RDF/XML, or "-" to read from Console.In.
- baseUri
- The URI of the document itself, to be taken as the Base URI for relative URIs encoutered in the document.
⊟ Remarks
None.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0
⊟ Dispose Method
Documentation for this section has not yet been entered.
protected override void Dispose ()⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.7.0
⊟ Select Method
Documentation for this section has not yet been entered.
public override void Select (StatementSink storage)⊟ Parameters
- storage
- Documentation for this section has not yet been entered.
⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.7.0