Created
March 27, 2013 09:04
-
-
Save daemontus/5252856 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="cs"> | |
<head> | |
<title>Document modification example</title> | |
</head> | |
<body> | |
<p> | |
<strong class="red blue" data-test="abc" disabled> | |
<i>Some text</i> | |
</strong> | |
</p> | |
<p></p> | |
<p> | |
<strong class="red blue" data-test="abc" disabled> | |
<i>Some text</i> | |
</strong> | |
</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="cs"> | |
<head> | |
<title>Document modification example</title> | |
</head> | |
<body> | |
<p> | |
<strong class="red blue" data-test="abc" disabled > | |
<i>Some text</i> | |
</strong> | |
</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "html.h" | |
int main(void) | |
{ | |
element* html = readDocument(); | |
element *clone = cloneNode(html->lastChild->firstChild, true); | |
appendChild(html->lastChild, clone); | |
element *clone2 = cloneNode(html->lastChild->firstChild, true); | |
appendChild(html->lastChild, clone2); | |
deleteElement(clone->lastChild); | |
printDocument(html); | |
deleteElement(html); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment