1. A system including a processor to infer XML schema definitions comprising: an XSD (XML schema definition) inference engine, the XSD inference engine configured to accept a XML document as input; the XSD inference engine further configured to process the XML document to generate an XML schema definition, wherein the XML schema definition includes at least an inferred first elements that appears in the XML document, an inferred first attributes associated with the first element, and an inferred first data type associated with the first attribute; the XSD inference engine further configured to add the XML schema definition to a collection; the XSD inference engine further configured to accept a second XML document as input and determine if the second XML document includes an inferred second attribute associated with the inferred first element that is inconsistent with the inference made with respect to first data type, and if so, the XSD inference engine is further configured to modify the schema definition in the collection by inferring a new data type that is consistent with the inferred first and second attributes.