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

Comment nodes #92

Open
cstjean opened this issue Oct 26, 2018 · 3 comments
Open

Comment nodes #92

cstjean opened this issue Oct 26, 2018 · 3 comments

Comments

@cstjean
Copy link

cstjean commented Oct 26, 2018

I see is_commentnode, but is there a way to create a comment node?

@bicycle1885
Copy link
Member

JFYI, EzXML.jl can do in this way: CommentNode("This is a comment.") 😏

@AhmedSalih3d
Copy link

Does LightXML still not support comment nodes?

@AhmedSalih3d
Copy link

For anyone curious this is a possibility:

using LightXML function new_comment(content::AbstractString) p = ccall((:xmlNewComment, LightXML.libxml2), LightXML.Xptr, (LightXML.Cstring,), content) return XMLNode(p) end

A big shoutout to @bicycle1885 for writing EzXML.jl, they were the reason I figured out how to do it, by looking at their code. I really like your use of @check macro, but chose to go with the simpler one here.

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

3 participants