XML Format

From the Directed Edge Developer Base
Revision as of 05:31, 20 May 2009 by Scott (talk | contribs) (start adding stuff)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

So, keeping in mind all of the basic structures from API Concepts, here's what they look like in XML.

First example

<?xml version="1.0" encoding="UTF-8"?>
<directededge version="0.1">
 <item id='user_1'>
  <property name='last name'>Schmidt</property>
  <property name='first name'>Bob</property>
 <item id='product_1'>
  <property name='artist'>Beatles</property>
  <property name='name'>White Album</property>

Here we've got a customer, named Bob Schmidt that's connected to an album called The White Album by Beatles. So we've got two items and one link. Let's start breaking this down a little.

XML Header

<?xml version="1.0" encoding="UTF-8"?>

Good old garden variety Wikipedia:XML XML header. We prefer UTF-8, but we shouldn't blow up if you send us other stuff.

directededge element

<directededge version="0.1">

Nothing too exotic here for the moment. This wraps up all of the stuff that you'll send our receive for the moment. Version is always 0.1 for the moment because, well, we're too lazy to bump the version. (Though we'll do better versioning once we're out of beta.)