Class SparqlXmlWriter
Class for saving Sparql Result Sets to the Sparql Results XML Format.
Implements
Inherited Members
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
public class SparqlXmlWriter : ISparqlResultsWriter
Methods
| Edit this page View SourceGenerateOutput(SparqlResultSet, XmlWriter)
Method which generates the Sparql Query Results XML Format serialization of the Result Set.
Declaration
protected void GenerateOutput(SparqlResultSet resultSet, XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | resultSet | |
XmlWriter | writer |
RaiseWarning(string)
Helper Method which raises the Warning event when a non-fatal issue with the SPARQL Results being written is detected.
Declaration
protected void RaiseWarning(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Warning Message. |
Save(SparqlResultSet, TextWriter)
Saves the Result Set to the given Stream in the Sparql Results XML Format.
Declaration
public virtual void Save(SparqlResultSet results, TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | |
TextWriter | output |
Save(SparqlResultSet, string)
Saves the Result Set to the given File in the Sparql Results XML Format using UTF-8 text encoding with no byte-order mark (BOM).
Declaration
public virtual void Save(SparqlResultSet results, string filename)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | Result Set to save. |
string | filename | File to save to. |
Remarks
To use a different file encoding (including UTF-8 with BOM), use Save(SparqlResultSet, string, Encoding) passing the appropriate Encoding instance, or Save(SparqlResultSet, TextWriter) with a configured TextWriter object.
Save(SparqlResultSet, string, Encoding)
Saves the Result Set to the given File in the Sparql Results XML Format.
Declaration
public virtual void Save(SparqlResultSet results, string filename, Encoding fileEncoding)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | Result Set to save. |
string | filename | File to save to. |
Encoding | fileEncoding | The text encoding to use for the output file. |
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 |
---|---|
string |
Overrides
Events
| Edit this page View SourceWarning
Event raised when a non-fatal issue with the SPARQL Results being written is detected
Declaration
public event SparqlWarning Warning
Event Type
Type | Description |
---|---|
SparqlWarning |