clarin.sru.fcs.xml.reader

class clarin.sru.fcs.xml.reader.SimpleEndpointDescriptionParser[source]

Bases: object

A parser, that parses an XML file and produces a endpoint description with static list of resource info records. The XML file has the same format as the result format defined for endpoint description of the CLARIN-FCS specification. The parse returns a SimpleEndpointDescription instance.

static parse(url: str | TextIO) EndpointDescription[source]

Parse an XML file and return a static list of resource info records.

Parameters:

url – the URI pointing to the file to be parsed

Returns:

EndpointDescription – an EndpointDescription instance

Raises:
  • SRUConfigException – if an error occurred

  • TypeError – if url is None