This depends on how loose you want the grammar to be. For example, making some clear assumptions:
data -> version '<classes>' classes '</classes>'
version -> '<?xml version=' quotedString 'encoding=' quotedString '?>'
classes -> '<class name=' quotedString '>' attributes '</class>' classes
attributes -> '<attr type=' quotedString '>' string '</attr>' attributes
(quotedString and string are terminals and all other terminals are between quotes)
Note how you could eliminate some productions from the grammar above, but that wouldn't improve readability.
As for the actual usage of this grammar: consider using an XML parsing library, that will probably be much more easier than using an actual parser generator (let alone manually implementing one).