Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming API - no END_ELEMENT for self-closing tags #198

Open
MKuranowski opened this issue Jul 10, 2024 · 0 comments
Open

Streaming API - no END_ELEMENT for self-closing tags #198

MKuranowski opened this issue Jul 10, 2024 · 0 comments

Comments

@MKuranowski
Copy link

I'm parsing OSM data, where sometimes elements are self-closing, and sometimes not:

<osm>
  <node id='1' lat='0.0' lon='0.0' />
  <node id='2' lat='1.0' lon='1.0'>
    <tag k='highway' v='stop' />
  </node>
</osm>

The generated elements from EzXML.StreamingReader:

(typ, reader.name) = (READER_ELEMENT, "osm")
(typ, reader.name) = (READER_ELEMENT, "node")
(typ, reader.name) = (READER_SIGNIFICANT_WHITESPACE, "#text")
(typ, reader.name) = (READER_ELEMENT, "node")
(typ, reader.name) = (READER_SIGNIFICANT_WHITESPACE, "#text")
(typ, reader.name) = (READER_ELEMENT, "tag")
(typ, reader.name) = (READER_SIGNIFICANT_WHITESPACE, "#text")
(typ, reader.name) = (READER_END_ELEMENT, "node")
(typ, reader.name) = (READER_SIGNIFICANT_WHITESPACE, "#text")
(typ, reader.name) = (READER_END_ELEMENT, "osm")

The READER_END_ELEMENT tag for the first, self-closing <node> is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant