stop rdf parsing at rdf:RDF tag
This commit is contained in:
1 parent
ecc2286733
commit
c4b70323c6
2 files changed
+3
-1
No files matched your search
@@ -21,6 +21,7 @@ defmodule FeedReader.Formats.RDF do
|
|||||||
limits: XMLResourceLimits.new(opts),
|
limits: XMLResourceLimits.new(opts),
|
||||||
frames: [],
|
frames: [],
|
||||||
channel: nil,
|
channel: nil,
|
||||||
|
root_closed: false,
|
||||||
error: nil
|
error: nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,5 +96,6 @@ defmodule FeedReader.Formats.RDF.Handler do
|
|||||||
{:ok, %{state | frames: [%{parent | children: children} | rest]}}
|
{:ok, %{state | frames: [%{parent | children: children} | rest]}}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp close_element(_frame, _value, state), do: {:ok, state}
|
defp close_element(_frame, _value, %{frames: []} = state),
|
||||||
|
do: {:halt, %{state | root_closed: true}}
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user