Structure-similarity method for attributed generalized trees is proposed. (Meta)data is expressed as a generalized tree, in which inner-vertex labels (as types) and edge labels (as attributes) embody semantic information, while edge weights express assessments regarding the (percentage-)relative importance of the attributes, a kind of pragmatic information added by domain experts. The generalized trees are uniformly represented and interchanged using a weighted extension of Object Oriented RuleML. The recursive similarity algorithm performs a top-down traversal of structures and computes the global similarity of two structures bottom-up considering vertex labels, edge labels, and edge-weight similarities. In order to compare generalized trees having different sizes, the effect of a missing sub-structure on the overall similarity is computed using a simplicity measure. The proposed similarity approach is applied in the retrieval of Electronic Medical Records (EMRs).