Eclipse UML2 model

The initial XML source of the Eclipse EMF-based UML2 metamodel

<model name="My model">
  <packagedElement type="Class" name="MyClass">
    <ownedAttribute name="myAttribute" visibility="private" type="test" />
    <ownedOperation name="myOperation" visibility="protected" type="test" />
  </packagedElement>
  <packagedElement type="Package" name="My package">
    <packagedElement type="Class" name="MyPackageClass">
      <packagedElement type="Class" name="MyNestedClass" />
    </packagedElement>
  </packagedElement>
  <packagedElement type="Class" name="MyOtherClass" id="test" >
    <ownedOperation name="myOperationWithParameters" visibility="public">
      <ownedParameter name="myFirstParam" />
      <ownedParameter name="mySecondParam" />
    </ownedOperation>
    <packagedElement type="uml-Class" name="MyAssociatedClass" id="test2">
  </packagedElement>
  <packagedElement type="uml-Dependency" client="test2" supplier="test">
  </packagedElement>
  </packagedElement>
</model>

Web components

Adaptation of the XML source: Web components names compatibility and self-closing tags removal

<uml-model name="My model">
  <uml-packagedElement type="uml-Class" name="MyClass" >
    <uml-ownedAttribute name="myAttribute" visibility="private" type="test" >
    </uml-ownedAttribute>
    <uml-ownedOperation name="myOperation" visibility="protected" type="test" >
    </uml-ownedOperation>
  </uml-packagedElement>
  <uml-packagedElement type="uml-Package" name="My package">
    <uml-packagedElement type="uml-Class" name="MyPackageClass">
      <uml-packagedElement type="uml-Class" name="MyNestedClass">
      </uml-packagedElement>
    </uml-packagedElement>
  </uml-packagedElement>
  <uml-packagedElement type="uml-Class" name="MyOtherClass" id="test" >
    <uml-ownedOperation name="myOperationWithParameters" visibility="public">
      <uml-ownedParameter name="myFirstParam">
      </uml-ownedParameter>
      <uml-ownedParameter name="mySecondParam">
      </uml-ownedParameter>
    </uml-ownedOperation>
  </uml-packagedElement>
  <uml-packagedElement type="uml-Class" name="MyAssociatedClass" id="test2">
  </uml-packagedElement>
  <uml-packagedElement type="uml-Dependency" client="test2" supplier="test">
  </uml-packagedElement>
</uml-model>