As I read the documentation for XMLEncoder, it's supposed to be used for serializing
JavaBeans. At least, that's what it says. Now, what's a JavaBean? Here's the link to what Wikipedia says it is:
http://en.wikipedia.org/wiki/JavaBean.
Now, read what it says a JavaBean class
must have. Does your Dog class have all of those features?