Show / Hide Table of Contents

Class RdfXmlFormatter

A formatter which formats triples for RDF/XML output.

Inheritance
System.Object
RdfXmlFormatter
Implements
IGraphFormatter
ITripleFormatter
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

Methods

| Improve this Doc 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
| Improve this Doc View Source

FormatGraphFooter()

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

Declaration
public string FormatGraphFooter()
Returns
Type Description
string
| Improve this Doc View Source

FormatGraphHeader()

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

Declaration
public string FormatGraphHeader()
Returns
Type Description
string
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View Source

ToString()

Gets the String description of this formatter.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
| Improve this Doc 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
System.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
System.Boolean

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

Implements

IGraphFormatter
ITripleFormatter

Extension Methods

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