Show / Hide Table of Contents

Class RdfXmlFormatter

A formatter which formats triples for RDF/XML output.

Inheritance
object
RdfXmlFormatter
Implements
IGraphFormatter
ITripleFormatter
ICommentFormatter
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRdf.dll
Syntax
public class RdfXmlFormatter : IGraphFormatter, ITripleFormatter, ICommentFormatter

Methods

| Edit this page View Source

Format(Triple)

Formats a Triple as a <rdf:Description> element.

Declaration
public string Format(Triple t)
Parameters
Type Name Description
Triple t

Triple.

Returns
Type Description
string
| Edit this page View Source

FormatComment(string)

Formats a String as comment String with the specified text.

Declaration
public virtual string FormatComment(string text)
Parameters
Type Name Description
string text

The comment String text.

Returns
Type Description
string

Comment string.

| Edit this page View Source

FormatGraphFooter()

Formats a Graph Footer by closing the <rdf:RDF> element.

Declaration
public string FormatGraphFooter()
Returns
Type Description
string
| Edit this page View Source

FormatGraphHeader()

Formats a Graph Header by creating an <rdf:RDF> element.

Declaration
public string FormatGraphHeader()
Returns
Type Description
string
| Edit this page View Source

FormatGraphHeader(IGraph)

Formats a Graph Header by creating an <rdf:RDF> element and adding namespace definitions.

Declaration
public string FormatGraphHeader(IGraph g)
Parameters
Type Name Description
IGraph g

Graph.

Returns
Type Description
string
| Edit this page View Source

FormatGraphHeader(INamespaceMapper, IUriFactory)

Formats a Graph Header by creating an <rdf:RDF> element and adding namespace definitions.

Declaration
public string FormatGraphHeader(INamespaceMapper namespaces, IUriFactory uriFactory = null)
Parameters
Type Name Description
INamespaceMapper namespaces

Namespaces.

IUriFactory uriFactory

The factory to use when creating new Uri instances.

Returns
Type Description
string
| Edit this page View Source

ToString()

Gets the String description of this formatter.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
| Edit this page View Source

TryReduceUriToQName(Uri, out string, out string)

Attempt to split the string representation of the specified URI into a valid QName and namespace pair.

Declaration
public static bool TryReduceUriToQName(Uri u, out string qName, out string ns)
Parameters
Type Name Description
Uri u

The URI to be split.

string qName

Receives the QName portion of the split URI if splitting was possible, null otherwise.

string ns

Receives the namespace portion of the split URI if splitting was possible, null otherwise.

Returns
Type Description
bool

True if the specified URI could be successfully split into a Namespace/QName pair, false otherwise.

Implements

IGraphFormatter
ITripleFormatter
ICommentFormatter

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Methods
    • Format(Triple)
    • FormatComment(string)
    • FormatGraphFooter()
    • FormatGraphHeader()
    • FormatGraphHeader(IGraph)
    • FormatGraphHeader(INamespaceMapper, IUriFactory)
    • ToString()
    • TryReduceUriToQName(Uri, out string, out string)
  • Implements
  • Extension Methods
Back to top Generated by DocFX