def from_xml(data)
      xml = XML::Node.from(data)
      raise 'invalid XML' unless xml.name == ox_tag
      
      returning new do |ox|
        (ox_attrs + ox_elems).each {|e| ox.send(e.setter,e.from_xml(xml))}
        ox.send(:after_parse) if ox.respond_to?(:after_parse)
      end
    end
def from_xml(data)
      xml = XML::Node.from(data)
      raise 'invalid XML' unless xml.name == ox_tag
      
      returning new do |ox|
        (ox_attrs + ox_elems).each {|e| ox.send(e.setter,e.from_xml(xml))}
        ox.send(:after_parse) if ox.respond_to?(:after_parse)
      end
    end
Returns a new instance from XML
 @param [XML::Document,XML::Node,File,Pathname,URI,String] data
   The xml data used to create a new instance.
 @return New instance generated from xml data passed in.
   Attr and Elem definitions are used to translate the xml to new object.