Thanks, Harald.  I've been very frustrated with GWT's lack of XPath
and with dealing with XML on the client via the DOM.  It's okay went I
create the XML and can ensure that fields are there, but difficult
when I can't.  Currently my approach has been to convert the XML to
JSON.  That's not been ideal, but it's been easier than using the
client side DOM.  I'll take a look at Piriti and see how it suits my
application.

On Mar 26, 12:25 pm, Harald Pehl <harald.p...@googlemail.com> wrote:
> Hi Thad,
>
> > 1) Any thoughts on when handing of attributes may be added?
>
> Mapping of attributes is already implemented: Using an XPath
> expression like
>
> @XmlField("/contact/@kind")
> String kind;
>
> you can map to the kind attribute of the contact element
> <contact kind="private">
>     ...
> </contact>
>
> Is this what you're looking for?
>
> > 2) How does Piriti handle optional, missing, and empty elements?  As
> > in your example, what if <author> is missing <surname>, or if
> > <surname> is either <surname/> or <surname></surname>?
>
> When the XPath expression of the @XmlField annotation does not select
> data,
> the field is left unchanged. In other words, if there is no <author/>
> element,
> the author field will be null. Same for missing and optional elements.
>
> HTH
> Harald

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to