Navigation Menu

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 XML node. #4331

Closed
wants to merge 2 commits into from
Closed

Unlink XML node. #4331

wants to merge 2 commits into from

Conversation

MrSorcus
Copy link
Contributor

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

@ysbaddaden
Copy link
Contributor

Could you write a spec to verify the behaviour, so it won't break in the future?

@MrSorcus
Copy link
Contributor Author

@ysbaddaden, #4329 - i tried, but it's failed. And i don't know why...

@RX14 RX14 mentioned this pull request Jun 4, 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

2 participants