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

Unlink a node. #4329

Closed
wants to merge 7 commits into from
Closed

Unlink a node. #4329

wants to merge 7 commits into from

Conversation

MrSorcus
Copy link
Contributor

@MrSorcus MrSorcus commented Apr 23, 2017

Example code

require "xml"

xml = <<-XML
 <person id="1">
  <firstname>Jane</firstname>
  <lastname>Doe</lastname>
 </person>
XML 
                                                                                    
document = XML.parse(xml)
    
document.xpath_node("//lastname").try(&.unlink)                                     
    
puts document.to_xml

But i'm not sure that's a good code...

@MrSorcus MrSorcus closed this Apr 23, 2017
@MrSorcus MrSorcus reopened this Apr 23, 2017
@MrSorcus
Copy link
Contributor Author

I can't fix trouble with heredoc...
Sorry...

@MrSorcus MrSorcus closed this Apr 23, 2017
@MrSorcus MrSorcus mentioned this pull request Apr 23, 2017
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

Successfully merging this pull request may close these issues.

None yet

1 participant