You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'main' panicked at 'called Result::unwrap() on an Err value: UnexpectedToken { token: "ElementEnd { end: Empty, span: StrSpan("/>" 19..21) }" }', src/main.rs:13:9
I would expect that this resulted in an empty string.
This seems to be backed by my reading of the xml spec.
[Definition: An element with no content is said to be empty.] The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. [Definition: An empty-element tag takes a special form:]
It seems that <foo></foo> and <foo/> are intended to be equivalent. I'm not 100% sure if if "no content" is equivalent to "content of an empty string" but they appear to be as far as I have read. So I think that this should parse just like <title></title> does.
The text was updated successfully, but these errors were encountered:
kevincox
added a commit
to kevincox/strong-xml
that referenced
this issue
May 3, 2022
I'm not sure if this is "intended" as it is definitely a weird case. But see the following example:
(Example inspired by https://github.com/Holllo/opml/blob/75eb03b23fa12cd241883d9ee86f16e93d274ff0/opml_api/source/lib.rs#L238)
Running this results in:
I would expect that this resulted in an empty string.
This seems to be backed by my reading of the xml spec.
It seems that
<foo></foo>
and<foo/>
are intended to be equivalent. I'm not 100% sure if if "no content" is equivalent to "content of an empty string" but they appear to be as far as I have read. So I think that this should parse just like<title></title>
does.The text was updated successfully, but these errors were encountered: