SemWeb : SemWeb Namespace
RdfXmlWriter Class

Writes RDF statements to an RDF/XML file.

public class RdfXmlWriter : RdfWriter

Remarks

The RdfXmlWriter buffers the entire output document in memory, before writing the document to the stream when Close is called.

The namespaces used in the output data must be registered with the NamespaceManager in the RdfWriter.Namespaces property before the first call to Add. Failure to do so may prevent the document from being written to the stream, as not all URIs can be automatically converted into an XML qualified name.

The following example writes out RDF statements in RDF/XML format to a file:

C# Example
using (RdfXmlWriter output = new RdfXmlWriter("filename.rdf")) {
    output.Namespaces.AddNamespace("http://xmlns.com/foaf/0.1/", "foaf");
    output.BaseUri = "http://www.example.org/";
    output.Write(datasource);
}  

All constructors for the RdfXmlWriter have a couterpart with an additional parameter for a SemWeb.RdfXmlWriter.Options object that specifies formatting parameters for the output. When an Options object is not used, RdfXmlWriter.Options.Full is used. This parameter can be used with the RdfXmlWriter.Options.XMP field to ensure the resulting XML document conforms to the Adobe XMP specification.

Requirements

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

Members

See Also: Inherited members from RdfWriter.

Public Constructors

Creates an RDF/XML writer that writes to the given TextWriter.
Creates an RDF/XML writer that writes to the named file.
Creates an RDF/XML writer that writes to the given XmlDocument.
Creates an RDF/XML writer that writes to the given XmlWriter.
Creates an RDF/XML writer that writes to the given TextWriter with output style options.
Creates an RDF/XML writer that writes to the named file with output style options.
Creates an RDF/XML writer that writes to the given XmlDocument with output style options.
Creates an RDF/XML writer that writes to the given XmlWriter with output style options.

Public Properties

override
Namespaces NamespaceManager . Documentation for this section has not yet been entered.

Public Methods

override
Add (Statement)
Documentation for this section has not yet been entered.
override
Close ()
Documentation for this section has not yet been entered.

Member Details

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the given TextWriter.

public RdfXmlWriter (System.IO.TextWriter writer)

Parameters

writer
A TextWriter.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the named file.

public RdfXmlWriter (string file)

Parameters

file
A file name, or "-" for standard output.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the given XmlDocument.

public RdfXmlWriter (System.Xml.XmlDocument dest)

Parameters

dest
A new, empty XmlDocument.

Remarks

The document must be empty.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the given XmlWriter.

public RdfXmlWriter (System.Xml.XmlWriter writer)

Parameters

writer
An XmlWriter.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the given TextWriter with output style options.

public RdfXmlWriter (System.IO.TextWriter writer, RdfXmlWriter.Options style)

Parameters

writer
A TextWriter.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the named file with output style options.

public RdfXmlWriter (string file, RdfXmlWriter.Options style)

Parameters

file
A file name, or "-" for standard output.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the given XmlDocument with output style options.

public RdfXmlWriter (System.Xml.XmlDocument dest, RdfXmlWriter.Options style)

Parameters

dest
A new, empty XmlDocument.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Exceptions

Type Reason
ArgumentNullException Documentation for this section has not yet been entered.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

RdfXmlWriter Constructor

Creates an RDF/XML writer that writes to the given XmlWriter with output style options.

public RdfXmlWriter (System.Xml.XmlWriter writer, RdfXmlWriter.Options style)

Parameters

writer
An XmlWriter.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Exceptions

Type Reason
ArgumentNullException Documentation for this section has not yet been entered.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Add Method

Documentation for this section has not yet been entered.

public override void Add (Statement statement)

Parameters

statement
Documentation for this section has not yet been entered.

Exceptions

Type Reason
ArgumentNullException 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

Close Method

Documentation for this section has not yet been entered.

public override void Close ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.7.0

Namespaces Property

Documentation for this section has not yet been entered.

public override NamespaceManager Namespaces { set; get; }

Value

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