Show / Hide Table of Contents

Class RdfXmlWriter

Class for generating RDF/XML Concrete Syntax.
Inheritance
System.Object
BaseRdfWriter
RdfXmlWriter
Implements
IRdfWriter
IPrettyPrintingWriter
ICompressingWriter
IDtdWriter
INamespaceWriter
IFormatterBasedWriter
Inherited Members
BaseRdfWriter.Save(IGraph, TextWriter)
BaseRdfWriter.Save(IGraph, TextWriter, Boolean)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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

| Improve this Doc View Source

RdfXmlWriter()

Creates a new RDF/XML Writer.
Declaration
public RdfXmlWriter()
| Improve this Doc View Source

RdfXmlWriter(Int32)

Creates a new RDF/XML Writer.
Declaration
public RdfXmlWriter(int compressionLevel)
Parameters
Type Name Description
System.Int32 compressionLevel Compression Level.
| Improve this Doc View Source

RdfXmlWriter(Int32, Boolean)

Creates a new RDF/XML Writer.
Declaration
public RdfXmlWriter(int compressionLevel, bool useDtd)
Parameters
Type Name Description
System.Int32 compressionLevel Compression Level.
System.Boolean useDtd Whether to use DTDs to further compress output.

Properties

| Improve this Doc View Source

CompressionLevel

Gets/Sets the Compression Level in use.
Declaration
public int CompressionLevel { get; set; }
Property Value
Type Description
System.Int32
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.

| Improve this Doc View Source

DefaultNamespaces

Gets/Sets the Default Namespaces that are always available.
Declaration
public INamespaceMapper DefaultNamespaces { get; set; }
Property Value
Type Description
INamespaceMapper
| Improve this Doc View Source

PrettyPrintMode

Gets/Sets Pretty Print Mode for the Writer.
Declaration
public bool PrettyPrintMode { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

TripleFormatterType

Gets the type of the Triple Formatter used by this writer.
Declaration
public Type TripleFormatterType { get; }
Property Value
Type Description
System.Type
| Improve this Doc View Source

UseDtd

Gets/Sets whether DTDs are used in the output.
Declaration
public bool UseDtd { get; set; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Save(IGraph, String)

Saves a Graph in RDF/XML syntax to the given File.
Declaration
public override void Save(IGraph g, string filename)
Parameters
Type Name Description
IGraph g Graph to save.
System.String filename Filename to save to.
Overrides
BaseRdfWriter.Save(IGraph, String)
| Improve this Doc View Source

SaveInternal(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.
System.IO.TextWriter output Stream to save to.
Overrides
BaseRdfWriter.SaveInternal(IGraph, TextWriter)
| Improve this Doc View Source

ToString()

Gets the String representation of the writer which is a description of the syntax it produces.
Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Events

| Improve this Doc View Source

Warning

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
Overrides
BaseRdfWriter.Warning

Implements

IRdfWriter
IPrettyPrintingWriter
ICompressingWriter
IDtdWriter
INamespaceWriter
IFormatterBasedWriter

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • RdfXmlWriter()
    • RdfXmlWriter(Int32)
    • RdfXmlWriter(Int32, Boolean)
  • Properties
    • CompressionLevel
    • DefaultNamespaces
    • PrettyPrintMode
    • TripleFormatterType
    • UseDtd
  • Methods
    • Save(IGraph, String)
    • SaveInternal(IGraph, TextWriter)
    • ToString()
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX