Listing 1

xostream& operator<<(xostream &xos, const YType& y)

{
  return xos << XML::STag("Y")
             << y.x1
             << y.x2
             << XML::ETag();
};
xistream& operator>>(xistream &xis, YType& y)
{
  return xis >> XML::STag("Y")
             >> y.x1
             >> y.x2
             >> XML::ETag();
};