Class HtmlWriter
Class for saving RDF Graphs to a XHTML Table format with the actual Triples embedded as RDFa.
Inherited Members
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 SourceDefaultNamespaces
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 SourceSave(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. |
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. |
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. |
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 SourceWarning
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 |