Last active
August 29, 2015 13:57
-
-
Save mamund/9578460 to your computer and use it in GitHub Desktop.
parsing an UBER doc
This file contains hidden or 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
<data id="user01" name="user"> <!-- URL=false + innerText=false + children=true + parent=false, so this is a container that belongs to the document --> | |
<data name="actions"> <!-- URL=false + innerText=false + children=true + parent=true, so this is a container that belongs to "user01" --> | |
<data rel="item" url="/user/1" action="read" /> <!-- URL=true + innerText=false + children=false + parent=true, so this is a transition that belongs to "user01/actions" --> | |
<data rel="/rels/replace" url="user/1" action="replace" template="#userUpdate" /> <!-- URL=true + innerText=false + children=false + parent=true, so this is a transition that belowngs to "user01/actions"--> | |
<data rel="/rels/delete" url="user/1" action="remove" /> <!-- URL=true + innerText=false + children=false + parent=true, so this is a transition that belowngs to "user01/actions" --> | |
<data rel="/rels/suspend" url="/suspendUser/{id}" action="append" /> <!-- URL=true + innerText=false + children=false + parent=true, so this is a transition that belowngs to "user01/actions" --> | |
<data rel="/rels/addEmail" url="/user/1?addEmail" action="append" model="{email}" /> <!-- URL=true + innerText=false + children=false + parent=true, so this is a transition that belowngs to "user01/actions" --> | |
<data rel="related" url="http://example.org/blogs/user01" action="read">Visit my blog</data> <!-- URL=true + innerText=true + children=false + parent=true, so this is a transition (with annotation text) that belongs to "user01/actions" --> | |
</data> | |
<data name="properties"> <!-- URL=false + innerText=false + children=true + parent=true, so this is a container belongs to "user01"--> | |
<data name="givenName">mike</data> <!-- URL=false + innerText=true + children=false + parent=true, so this is a data element that belongs to "user01/properties"--> | |
<data name="faimlyName">amundsen</data> <!-- URL=false + innerText=true + children=false + parent=true, so this is a data element that belongs to "user01/properties" --> | |
<data name="email">[email protected]</data> <!-- URL=false + innerText=true + children=false + parent=true, so this is a data element that belongs to "user01/properties" --> | |
</data> | |
</data> |
yep - this is a totally fine representation of the same data. my goal is to design UBER such that it allows differences like this w/o problem.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An alternative way to render this same data (right?):