Class RdfXmlFormatter
A formatter which formats triples for RDF/XML output.
Inheritance
Inherited Members
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRdf.dll
Syntax
public class RdfXmlFormatter : IGraphFormatter, ITripleFormatter
Methods
| Improve this Doc View SourceFormat(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 |
FormatGraphFooter()
Formats a Graph Footer by closing the <rdf:RDF> element.
Declaration
public string FormatGraphFooter()
Returns
Type | Description |
---|---|
string |
FormatGraphHeader()
Formats a Graph Header by creating an <rdf:RDF> element.
Declaration
public string FormatGraphHeader()
Returns
Type | Description |
---|---|
string |
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 |
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 |
ToString()
Gets the String description of this formatter.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
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. |