Microdata v0.2.4 Microdata.Document View Source

Microdata.Document is the base struct returned after parsing a microdata document.

Link to this section Summary

Functions

Lookup top-level items in the document with matching types

Link to this section Types

Link to this type t() View Source
t() :: %Microdata.Document{items: [Microdata.Item.t()]}

Link to this section Functions

Lookup top-level items in the document with matching types.

Examples (not a doctest)

iex> Microdata.Document.lookup(doc, "foo")
[%Microdata.Item{types: ["foo"], ...}, ...]

iex> Microdata.Document.lookup(doc, ["foo", "bar"])
[
  %Microdata.Item{types: ["foo"], ...},
  %Microdata.Item{types: ["bar"], ...}, ...
]