Obtener un Elemento

Superior  Previo  Próximo

Para recuperar información acerca de un elemento en EA, use la interfaz GetElement. Esta toma un GUID de un Elemento previamente obtenido usando una de las interfaces de enumeración, y devuelve un documento XML conteniendo todos los detalles del elemento. Para elementos Clase, esto también incluirá detalles de Operación y Atributo.

 

La   interfaz se define como GetElement(const VARIANT FAR& ElementGUID) -toma el GUID de un elemento y devuelve un documento XML-. 

 

 

Abajo se da un ejemplo de documento de elemento XML

<?xml version="1.0"?> 

<Document xmlns:UML="omg.org/UML1.3"> 

  <Element> 

  <UML:Class name="Customer" xmi.id="EAID_D5663F5E_D116_4767_A13B_F9EE25BCFF9E" visibility="public" namespace="EAPK_C14247A1_6C15_4b5a_9AFC_98A4A5611138" isRoot="false" isLeaf="false" isAbstract="true"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="ea_stype" value="Class" /> 

  <UML:TaggedValue tag="ea_ntype" value="0" /> 

  <UML:TaggedValue tag="version" value="1.0" /> 

  <UML:TaggedValue tag="package" value="EAPK_C14247A1_6C15_4b5a_9AFC_98A4A5611138" /> 

  <UML:TaggedValue tag="date_created" value="9/30/2000" /> 

  <UML:TaggedValue tag="date_modified" value="9/2/2001" /> 

  <UML:TaggedValue tag="genfile" value="C:\Documents and Settings\Administrator\Desktop\Customer.cls" /> 

  <UML:TaggedValue tag="gentype" value="Visual Basic" /> 

  <UML:TaggedValue tag="tagged" value="0" /> 

  <UML:TaggedValue tag="package_name" value="LM01-1: Customer Domain" /> 

  <UML:TaggedValue tag="phase" value="1.0" /> 

  <UML:TaggedValue tag="author" value="Geoffrey Sparks" /> 

  <UML:TaggedValue tag="complexity" value="1" /> 

  <UML:TaggedValue tag="documentation" value="A customer class. Contains attributes and behavior corresponding to a customer of the on-line bookstore. A customer has a current account with the book store and preferred shipping methods." /> 

  <UML:TaggedValue tag="status" value="Approved" /> 

  <UML:TaggedValue tag="style" value="BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:Classifier.feature> 

  <UML:Attribute name="Account" visibility="private" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="CustomerAccount" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="containment" value="Not Specified" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="description" value="The customer account object" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="genoption" value="PROPERTY=Account;" /> 

  <UML:TaggedValue tag="scope" value="Private" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:ModelElement.constraint> 

  <UML:Constraint name="Not null"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="Pre-Condition" /> 

  <UML:TaggedValue tag="documentation" value="Customer account cannot be null" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Constraint> 

  </UML:ModelElement.constraint> 

  </UML:Attribute> 

 

  <UML:Attribute name="Address" visibility="private" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="containment" value="Not Specified" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="1" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="genoption" value="PROPERTY=DED;" /> 

  <UML:TaggedValue tag="scope" value="Private" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="City" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

<UML:TaggedValue tag="containment" value="Not Specified" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="2" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="Country" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="Country" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="3" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="CustomerID" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="4" /> 

  <UML:TaggedValue tag="description" value="Unique identifier for a customer. Used internally only." /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="FirstName" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="5" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="LastLogin" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="6" /> 

  <UML:TaggedValue tag="description" value="The last time this user logged in. Display when user logs in" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="Login" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="7" /> 

  <UML:TaggedValue tag="description" value="The user login in" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="Password" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="DateTime" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="8" /> 

  <UML:TaggedValue tag="description" value="The user's password. " /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:ModelElement.constraint> 

  <UML:Constraint name="&gt;=8 Characters"> 

  <UML:ModelElement.taggedValue /> 

  </UML:Constraint> 

  </UML:ModelElement.constraint> 

  </UML:Attribute> 

 

  <UML:Attribute name="Preferences" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="CustomerPreferences" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="9" /> 

  <UML:TaggedValue tag="description" value="A Customer preferences object" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="Surname" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="10" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Attribute name="Zip" visibility="public" ownerScope="instance" changeable="none" targetScope="instance"> 

  <UML:Attribute.initialValue> 

  <UML:Expression /> 

  </UML:Attribute.initialValue> 

 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="Zip" /> 

  <UML:TaggedValue tag="derived" value="0" /> 

  <UML:TaggedValue tag="length" value="0" /> 

  <UML:TaggedValue tag="ordered" value="0" /> 

  <UML:TaggedValue tag="precision" value="0" /> 

  <UML:TaggedValue tag="scale" value="0" /> 

  <UML:TaggedValue tag="collection" value="false" /> 

  <UML:TaggedValue tag="position" value="11" /> 

  <UML:TaggedValue tag="duplicates" value="0" /> 

  <UML:TaggedValue tag="scope" value="Public" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Attribute> 

 

  <UML:Operation name="Account" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="CustomerAccount" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="stereotype" value="property get" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Operation> 

 

  <UML:Operation name="Account" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="stereotype" value="property let" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:BehavioralFeature.parameter> 

  <UML:Parameter name="NewVal" visibility="public"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="pos" value="0" /> 

  <UML:TaggedValue tag="type" value="CustomerAccount" /> 

  <UML:TaggedValue tag="const" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:Parameter.defaultValue> 

  <UML:Expression /> 

  </UML:Parameter.defaultValue> 

  </UML:Parameter> 

  </UML:BehavioralFeature.parameter> 

  </UML:Operation> 

 

  <UML:Operation name="AddCustomer" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="bool" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:BehavioralFeature.parameter> 

  <UML:Parameter name="Name" visibility="public"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="pos" value="1" /> 

  <UML:TaggedValue tag="type" value="String" /> 

  <UML:TaggedValue tag="const" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:Parameter.defaultValue> 

  <UML:Expression /> 

  </UML:Parameter.defaultValue> 

  </UML:Parameter> 

 

  <UML:Parameter name="AccountID" kind="in" visibility="public"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="pos" value="0" /> 

  <UML:TaggedValue tag="note" value="The default customer account ID" /> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="const" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:Parameter.defaultValue> 

  <UML:Expression /> 

  </UML:Parameter.defaultValue> 

  </UML:Parameter> 

  </UML:BehavioralFeature.parameter> 

  </UML:Operation> 

 

  <UML:Operation name="DeleteCustomer" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="bool" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Operation> 

 

  <UML:Operation name="GetAccount" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="CustomerAccount" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:BehavioralFeature.parameter> 

  <UML:Parameter name="dsd" visibility="public"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="pos" value="0" /> 

  <UML:TaggedValue tag="type" value="Functional" /> 

  <UML:TaggedValue tag="const" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:Parameter.defaultValue> 

  <UML:Expression body="sd" /> 

  </UML:Parameter.defaultValue> 

  </UML:Parameter> 

  </UML:BehavioralFeature.parameter> 

  </UML:Operation> 

 

  <UML:Operation name="GetCustomerAsXML" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="string" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Operation> 

 

  <UML:Operation name="GetPreferences" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="CustomerPreferences" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Operation> 

 

  <UML:Operation name="UpdateCustomer" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="bool" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

 

  <UML:BehavioralFeature.parameter> 

  <UML:Parameter name="Fred" visibility="public"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="pos" value="0" /> 

  <UML:TaggedValue tag="type" value="xml" /> 

  <UML:TaggedValue tag="const" value="0" /> 

  </UML:ModelElement.taggedValue> 

  <UML:Parameter.defaultValue> 

  <UML:Expression /> 

  </UML:Parameter.defaultValue> 

  </UML:Parameter> 

  </UML:BehavioralFeature.parameter> 

  </UML:Operation> 

 

  <UML:Operation name="ValidateCustomer" visibility="public" ownerScope="instance" isQuery="false" concurrency="sequential"> 

  <UML:ModelElement.taggedValue> 

  <UML:TaggedValue tag="type" value="void" /> 

  <UML:TaggedValue tag="const" value="false" /> 

  <UML:TaggedValue tag="static" value="1" /> 

  <UML:TaggedValue tag="synchronised" value="0" /> 

  <UML:TaggedValue tag="concurrency" value="Sequential" /> 

  <UML:TaggedValue tag="position" value="0" /> 

  <UML:TaggedValue tag="returnarray" value="0" /> 

  <UML:TaggedValue tag="pure" value="0" /> 

  </UML:ModelElement.taggedValue> 

  </UML:Operation> 

  </UML:Classifier.feature> 

  </UML:Class> 

  </Element> 

</Document> 

 

 

Abajo se da un ejemplo de código Visual Basic utilizando esta interfaz -observe  que incluye llamadas a calls to get element extensions - tales como pruebas  y recursos

 

Private Sub GetElement(ObjectGUID As String) 

On Error GoTo errElement 

 

'obtener un elemento desde el modelo - incluye 

'todos los atributos y valores etiquetados  

'seguido por extensiones de elementos - tales como restricciones, pruebas, etc. 

 

Dim xmlNode As MSXML2.IXMLDOMNode 

Dim xmlElement As New MSXML2.DOMDocument 

Dim xmlDoc As New MSXML2.DOMDocument 

Dim xmlTagged As MSXML2.IXMLDOMNode 

Dim n As Integer 

 

xmlElement.loadXML EAProject.GetElement(ObjectGUID) 

 

Set xmlNode = xmlElement.selectSingleNode("Document/Element") 

 

'ir al primer elemento - será el elemento actual (ej. UML:Actor) 

Set xmlNode = xmlNode.firstChild() 

 

'If (xmlNode.nodeName = 'UML:Class') Then Debug.Print vbCrLf + xmlElement.xml + vbCrLf 

 

AddToDebugList "---------------------------" 

AddToDebugList xmlNode.nodeName 

 

'obtener primero los atributos

For n = 0 To xmlNode.Attributes.length - 1 

AddToDebugList xmlNode.Attributes.item(n).nodeName + " =: " + xmlNode.Attributes.item(n).Text 

Next n 

 

'obtener operaciones y atributos

GetFeatures xmlNode 

 

'y luego obtener los valores etiquetados

Set xmlTagged = xmlNode.selectSingleNode("UML:ModelElement.taggedValue/UML:TaggedValue") 

Do While (Not xmlTagged Is Nothing) 

AddToDebugList xmlTagged.Attributes(0).Text + " =: " + xmlTagged.Attributes(1).Text 

Set xmlTagged = xmlTagged.nextSibling 

Loop 

 

 

'ahora las extensiones de procesos

 

xmlDoc.loadXML (EAProject.GetElementScenarios(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.scenario", "EAScenario") 

 

xmlDoc.loadXML (EAProject.GetElementRequirements(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/UML:ModelElement.requirement", "UML:Dependency") 

 

xmlDoc.loadXML (EAProject.GetElementConstraints(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/UML:ModelElement.Constraint", "UML:Constraint") 

 

xmlDoc.loadXML (EAProject.GetElementEffort(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.effort", "EAEffort") 

 

xmlDoc.loadXML (EAProject.GetElementMetrics(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.metric", "EAMetric") 

 

xmlDoc.loadXML (EAProject.GetElementFiles(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.file", "EAFile") 

 

xmlDoc.loadXML (EAProject.GetElementProblems(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.defect", "EADefect") 

 

xmlDoc.loadXML (EAProject.GetElementResources(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.resource", "EAResource") 

 

xmlDoc.loadXML (EAProject.GetElementRisks(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.risk", "EARisk") 

 

xmlDoc.loadXML (EAProject.GetElementTests(ObjectGUID)) 

Call GetExtension(xmlDoc, "Document/Element/EAModel.test", "EATest") 

 

AddToDebugList "End " + xmlNode.nodeName 

AddToDebugList "---------------------------" 

AddToDebugList " " 

 

Exit Sub 

 

 

errElement: 

AddToDebugList Error$ 

 

End Sub