Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created January 30, 2012 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/1706190 to your computer and use it in GitHub Desktop.
Save jnthn/1706190 to your computer and use it in GitHub Desktop.
Here's the doc, in text form, before parsing:
<test><element1 attrib1="hello" attrib2="world"/><element2 attrib1="goodbye" attrib2="universe">with content</element2><element3 what="is it"><foo/></element3></test>
Setting attrib1 to hello
Setting attrib2 to world
Now, here's the doc, after being parsed into an object.
<?xml version="1.0"?><test><element1 attrib1="hello" attrib2="world"/><element2>with content</element2><element3><foo/></element3></test>
Now, what happened to the attributes for the element with contents?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment