-
Notifications
You must be signed in to change notification settings - Fork 36
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
The root is not the root element? #40
Comments
Hmm, yes, it appears I've accidentally colluded some bits of terminology. You are correct that the result of
(emphasis mine). This is unfortunate as I've also already used "document" to mean something else; the entrypoint to the allocation functions and owner of the DOM... I wonder if there's anything preventing combining |
Actually a document is the whole shebang including all metadata like the XML version and encoding and may also contain comments while the root is supposed to be the only regular element directly in the document. I also don't quite get why there's a distinction between I thought the easiest change would be to change:
to return an Element instead but I failed miserably trying to implement that because a lot of code depends on the "root" being a |
You'll note that
|
True, but |
While trying to work with a parsed document I found something strange and rather counter-intuitive: The root does not seem to be the root element of the parsed document so when I iterate over the children of the root I will actually see all top level elements of the document including the root element itself.
The text was updated successfully, but these errors were encountered: