Using the google-api-java-client I have gathered that the library parses the xml based on the classes you create and the keys you make. For example: if you have the following XML:
<entry test="ok">
<link name="somewhere.org"/>
</entry>
Then you could have these two classes:
public class Entry
{
@Key("@test")
public String test;
@Key("link")
public Link link;
}
public class Link
{
@Key("name")
public String name;
}
And the library would parse the xml and create the appropriate classes (if I understand it correctly)
If that is the case, how does one represent an xml tag that has both attributes and a value? Example:
<entry test="ok">
<link name="somewhere.org">SomeValue</link>
</entry>
In particular I'm trying to represent a record such as the following so I can insert it into a google docs spreadsheet:
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:gs="http://schemas.google.com/spreadsheets/2006">
<title>Darcy</title>
<gs:field name='Birthday'>2/10/1785</gs:field>
<gs:field name='Age'>28</gs:field>
<gs:field name='Name'>Darcy</gs:field>
<gs:field name='CanVote'>No</gs:field>
</entry>
Also, where is this documented? I can't find the documentation but perhaps I'm just not looking in the right place.