Show / Hide Table of Contents

Class HtmlWriter

Class for saving RDF Graphs to a XHTML Table format with the actual Triples embedded as RDFa.
Inheritance
System.Object
BaseHtmlWriter
HtmlWriter
Implements
IHtmlWriter
IRdfWriter
INamespaceWriter
Inherited Members
BaseHtmlWriter.Stylesheet
BaseHtmlWriter.CssClassUri
BaseHtmlWriter.CssClassBlankNode
BaseHtmlWriter.CssClassLiteral
BaseHtmlWriter.CssClassDatatype
BaseHtmlWriter.CssClassLangSpec
BaseHtmlWriter.CssClassBox
BaseHtmlWriter.UriPrefix
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 HtmlWriter : BaseHtmlWriter, IHtmlWriter, IRdfWriter, INamespaceWriter
Remarks

Since not all Triples can be embedded into XHTML those Triples will not have RDFa generated for them but all Triples will be shown in a human readable format. Triples that can be serialized are roughly equivalent to anything that can be serialized in Turtle i.e. URI/BNode subject, URI predicates and URI/BNode/Literal object.

If you encode Triples which have values datatyped as XML Literals with this writer then round-trip Graph equality is not guaranteed as the RDFa parser will add appropriate Namespace declarations to elements as required by the specification.

Properties

| Improve this Doc View Source

DefaultNamespaces

Gets/Sets the Default Namespaces to use for writers.
Declaration
public INamespaceMapper DefaultNamespaces { get; set; }
Property Value
Type Description
INamespaceMapper

Methods

| Improve this Doc View Source

Save(IGraph, TextWriter)

Saves the Result Set to the given Stream as an XHTML Table with embedded RDFa.
Declaration
public void Save(IGraph g, TextWriter output)
Parameters
Type Name Description
IGraph g Graph to save.
System.IO.TextWriter output Stream to save to.
| Improve this Doc View Source

Save(IGraph, TextWriter, Boolean)

Save the Graph to the given Stream as an XHTML Table with embedded RDFa.
Declaration
public void Save(IGraph g, TextWriter output, bool leaveOpen)
Parameters
Type Name Description
IGraph g Graph to save.
System.IO.TextWriter output Stream to save to.
System.Boolean leaveOpen Whether to leave output open after writing the graph.
| Improve this Doc View Source

Save(IGraph, String)

Saves the Graph to the given File as an XHTML Table with embedded RDFa.
Declaration
public void Save(IGraph g, string filename)
Parameters
Type Name Description
IGraph g Graph to save.
System.String filename File to save to.
| 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 if there is a non-fatal error with the RDF being output
Declaration
public event RdfWriterWarning Warning
Event Type
Type Description
RdfWriterWarning

Implements

IHtmlWriter
IRdfWriter
INamespaceWriter

Extension Methods

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