Class RdfXmlWriter
Class for generating RDF/XML Concrete Syntax.
Implements
Inherited Members
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
public class RdfXmlWriter : BaseRdfWriter, IRdfWriter, IPrettyPrintingWriter, ICompressingWriter, IDtdWriter, INamespaceWriter, IFormatterBasedWriter
Remarks
This is a fast writer based on the fast writing technique used in the other non-RDF/XML Writers.
Note: If the Graph to be serialized makes heavy use of collections it may result in a StackOverflowException. To address this set the CompressionLevel property to < 5.
Constructors
| Edit this page View SourceRdfXmlWriter()
Creates a new RDF/XML Writer.
Declaration
public RdfXmlWriter()
RdfXmlWriter(int)
Creates a new RDF/XML Writer.
Declaration
public RdfXmlWriter(int compressionLevel)
Parameters
Type | Name | Description |
---|---|---|
int | compressionLevel | Compression Level. |
RdfXmlWriter(int, bool)
Creates a new RDF/XML Writer.
Declaration
public RdfXmlWriter(int compressionLevel, bool useDtd)
Parameters
Type | Name | Description |
---|---|---|
int | compressionLevel | Compression Level. |
bool | useDtd | Whether to use DTDs to further compress output. |
Properties
| Edit this page View SourceCompressionLevel
Gets/Sets the Compression Level in use.
Declaration
public int CompressionLevel { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
Compression Level defaults to High - if Compression Level is set to below More i.e. < 5 then Collections will not be compressed into more compact syntax.
DefaultNamespaces
Gets/Sets the Default Namespaces that are always available.
Declaration
public INamespaceMapper DefaultNamespaces { get; set; }
Property Value
Type | Description |
---|---|
INamespaceMapper |
PrettyPrintMode
Gets/Sets Pretty Print Mode for the Writer.
Declaration
public bool PrettyPrintMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
TripleFormatterType
Gets the type of the Triple Formatter used by this writer.
Declaration
public Type TripleFormatterType { get; }
Property Value
Type | Description |
---|---|
Type |
UseDtd
Gets/Sets whether DTDs are used in the output.
Declaration
public bool UseDtd { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceSaveInternal(IGraph, TextWriter)
Saves a Graph to an arbitrary output stream.
Declaration
protected override void SaveInternal(IGraph g, TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
TextWriter | output | Stream to save to. |
Overrides
| Edit this page View SourceToString()
Gets the String representation of the writer which is a description of the syntax it produces.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Events
| Edit this page View SourceWarning
Event which is raised when there is a non-fatal issue with the RDF being output
Declaration
public override event RdfWriterWarning Warning
Event Type
Type | Description |
---|---|
RdfWriterWarning |