Show / Hide Table of Contents

Class RdfXmlParser

Parser for RDF/XML syntax.

Inheritance
object
RdfXmlParser
Implements
IRdfReader
ITraceableParser
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class RdfXmlParser : IRdfReader, ITraceableParser

Constructors

| Edit this page View Source

RdfXmlParser()

Creates a new RDF/XML Parser.

Declaration
public RdfXmlParser()
| Edit this page View Source

RdfXmlParser(RdfXmlParserMode)

Creates a new RDF/XML Parser which uses the given parsing mode.

Declaration
public RdfXmlParser(RdfXmlParserMode mode)
Parameters
Type Name Description
RdfXmlParserMode mode

RDF/XML Parse Mode.

Fields

| Edit this page View Source

XmlReaderSettings

Get the settings to pass through to the underlying XML parser used when parsing in streaming mode.

Declaration
public readonly XmlReaderSettings XmlReaderSettings
Field Value
Type Description
XmlReaderSettings

Properties

| Edit this page View Source

TraceParsing

Controls whether Parser progress will be traced by writing output to the Console.

Declaration
public bool TraceParsing { get; set; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

Load(IGraph, StreamReader)

Reads RDF/XML syntax from some Stream into the given Graph.

Declaration
public void Load(IGraph g, StreamReader input)
Parameters
Type Name Description
IGraph g

Graph to create Triples in.

StreamReader input

Input Stream.

| Edit this page View Source

Load(IGraph, TextReader)

Reads RDF/XML syntax from some Input into the given Graph.

Declaration
public void Load(IGraph g, TextReader input)
Parameters
Type Name Description
IGraph g

Graph to create Triples in.

TextReader input

Input to read from.

| Edit this page View Source

Load(IGraph, string)

Reads RDF/XML syntax from some File into the given Graph.

Declaration
public void Load(IGraph g, string filename)
Parameters
Type Name Description
IGraph g

Graph to create Triples in.

string filename

Filename of File containg XML/RDF.

Remarks

Simply opens a Stream for the File then calls the other version of Load to do the actual parsing.

| Edit this page View Source

Load(IGraph, XmlDocument)

Reads RDF/XML from the given XML Document.

Declaration
public void Load(IGraph g, XmlDocument document)
Parameters
Type Name Description
IGraph g

Graph to load into.

XmlDocument document

XML Document.

| Edit this page View Source

Load(IRdfHandler, StreamReader)

Reads RDF/XML syntax from some Stream using a RDF Handler.

Declaration
public void Load(IRdfHandler handler, StreamReader input)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

StreamReader input

Input Stream.

| Edit this page View Source

Load(IRdfHandler, StreamReader, IUriFactory)

Reads RDF/XML syntax from some Stream using a RDF Handler.

Declaration
public void Load(IRdfHandler handler, StreamReader input, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

StreamReader input

Input Stream.

IUriFactory uriFactory

URI Factory to use.

| Edit this page View Source

Load(IRdfHandler, TextReader)

Reads RDF/XML syntax from some Input using a RDF Handler.

Declaration
public void Load(IRdfHandler handler, TextReader input)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

TextReader input

Input to read from.

| Edit this page View Source

Load(IRdfHandler, TextReader, IUriFactory)

Reads RDF/XML syntax from some Input using a RDF Handler.

Declaration
public void Load(IRdfHandler handler, TextReader input, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

TextReader input

Input to read from.

IUriFactory uriFactory

URI factory to use.

| Edit this page View Source

Load(IRdfHandler, string)

Reads RDF/XML syntax from a file using a RDF Handler.

Declaration
public void Load(IRdfHandler handler, string filename)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

string filename

File to read from.

| Edit this page View Source

Load(IRdfHandler, string, IUriFactory)

Method for Loading RDF using a RDF Handler from some Concrete RDF Syntax from a given File.

Declaration
public void Load(IRdfHandler handler, string filename, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

string filename

The Filename of the File to read from.

IUriFactory uriFactory

URI factory to use.

Exceptions
Type Condition
RdfException

Thrown if the Parser tries to output something that is invalid RDF.

RdfParseException

Thrown if the Parser cannot Parse the Input.

IOException

Thrown if the Parser encounters an IO Error while trying to access/parse the Stream.

| Edit this page View Source

ToString()

Gets the String representation of the Parser which is a description of the syntax it parses.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Events

| Edit this page View Source

Warning

Event which Readers can raise when they notice syntax that is ambigious/deprecated etc which can still be parsed

Declaration
public event RdfReaderWarning Warning
Event Type
Type Description
RdfReaderWarning

Implements

IRdfReader
ITraceableParser

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • RdfXmlParser()
    • RdfXmlParser(RdfXmlParserMode)
  • Fields
    • XmlReaderSettings
  • Properties
    • TraceParsing
  • Methods
    • Load(IGraph, StreamReader)
    • Load(IGraph, TextReader)
    • Load(IGraph, string)
    • Load(IGraph, XmlDocument)
    • Load(IRdfHandler, StreamReader)
    • Load(IRdfHandler, StreamReader, IUriFactory)
    • Load(IRdfHandler, TextReader)
    • Load(IRdfHandler, TextReader, IUriFactory)
    • Load(IRdfHandler, string)
    • Load(IRdfHandler, string, IUriFactory)
    • ToString()
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX