Skip to content

Instantly share code, notes, and snippets.

@supernovus
Created January 30, 2012 19:27
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 supernovus/1706138 to your computer and use it in GitHub Desktop.
Save supernovus/1706138 to your computer and use it in GitHub Desktop.
what is wrong, from my rakudo
$ perl6 what-is-wrong.p6
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>
attribs:
attribs: attrib1="hello" attrib2="world"
attribute found
Setting attrib1 to hello
Setting attrib2 to world
attribs:
attribs:
attribs:
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