Hi Eskizo, I've added some code to our examples site for de/serializing CCR to/ from several Java POJOs using a SAX parser. Dealing with XML in this manner requires much more code than automatic data binding (e.g. JAXB), but you won't have any external JAR dependencies. The examples deals with CCR Results, but could be modified to work with medications.
You can find the code at: http://code.google.com/p/googlehealthsamples/source/browse/#svn/trunk/java/ccr I hope this helps! Paul S. On Oct 21, 6:33 am, Rafa Eskizo <[email protected]> wrote: > Hi, > > I have a XMLBlob result of a Query and i need to parse it into a > JavaObject. > I have created a Java class with the same attributes that CCR. I have > read about CCR4j, XMlParser and XMLParserElementHandler but i have no > idea how I could get the values of the attributes. > > For example : > > String url = "https://www.google.com/health/feeds/profile/ui/" + > firstProfileID + "/-/medication"; > ProfileFeed profileFeed = healthService.getFeed(new URL(url), > ProfileFeed.class); > for (ProfileEntry entry : profileFeed.getEntries()) <--- this is the > query. > entry.getContinuityOfCareRecord().getXmlBlob(); <-- For each > medication we have a XmlBlob > > Now, we need to parse this XMLBlob into java Object. > > Thanks, > > Eskizo. -- You received this message because you are subscribed to the Google Groups "Google Health Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/googlehealthdevelopers?hl=en.
