FeedReader.FormatDetector.RootTag (FeedReader v0.3.0)

Copy Markdown

Scans bounded XML prefixes for complete root start tags and quoted attributes, skipping prolog markup so detection can check root namespaces without parsing or consuming the full feed.

Summary

Functions

Classifies a complete Atom or RDF root using its namespace bindings.

Types

format()

@type format() :: :atom | :rdf | :unknown

t()

@type t() :: %{name: String.t(), attributes: [{String.t(), String.t()}]}

Functions

classify(prefix)

@spec classify(binary()) :: format()

Classifies a complete Atom or RDF root using its namespace bindings.

probe(prefix)

@spec probe(binary()) :: {:ok, t()} | :incomplete | :invalid