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

detecting DOCTYPE #36

Open
mvolkmann opened this issue May 11, 2012 · 3 comments
Open

detecting DOCTYPE #36

mvolkmann opened this issue May 11, 2012 · 3 comments

Comments

@mvolkmann
Copy link

It would be nice if there was an event emitted for the DOCTYPE that provided the name, public id and system id.

@astro
Copy link
Collaborator

astro commented May 11, 2012

We can pass an XML_StartDoctypeDeclHandler to libexpat, so this is totally doable.

@mvolkmann
Copy link
Author

I have written code that uses node-expat to parse XML and create a JSON representation. It can also take that JSON and reconstruct the XML in a lossless way. node-expat worked wonderfully for this! The DOCTYPE is the only part of XML I'm not handling now.

@rspieker
Copy link

bump

Would you be so kind to implement both startDoctypeDecl and endDoctypeDecl, I think you are right that these are already available in libexpat itself.
From what I (seem to) understand, these need to be added to the node-expat.cc file, if it was within my powers I'd submit a pull request, but every attempt I have made to the add these results in horrible compilation errors (as I am not proficient in c/c++) :)

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

No branches or pull requests

3 participants