The _ATTRIBUTES
(or _ATTRS
) element is used to retrieve attributes of the current object or relationship that is being retrieved from the Enovia repository. The current object is the last business object in the Enovia repository that was retrieved based on elements further up the DocumentsXML
XML hierarchy.
The object or relationship attributes are inserted as fields in the document metadata.
The attributes that are retrieved can be specified using one of the following methods:
attr_pattern
attribute to specify a comma-separated list of attribute names.attr_regex
attribute to specify a regular expression._ATTRIBUTES
element can also contain a comma separated list of object or relationship attributes to retrieve (for an example, see Example: Use the _ATTRIBUTES Element).Attribute | Description |
---|---|
attr_pattern
|
A comma-separated list of attribute names. Attributes that match one or more of the names are retrieved. The wildcards * and ? can be used. |
attr_regex
|
A regular expression to restrict what attributes are retrieved. Attributes with names that match the regular expression are retrieved. |
node_name
|
The name of the metadata field created to contain the attribute values. If When If For an example that uses |
name_attr
|
The name of the XML metadata attribute to contain the name of the object or relationship attribute. For an example that uses |
_ATTRIBUTES
ElementThe following examples result in similar output (with attributes from a top-level object, relationship, or other related object):
<DOCUMENT ...> <_ATTRS attr_regex="attr .*" node_name="attributes"/> </DOCUMENT> <DOCUMENT ...> <attributes> <_ATTRS attr_pattern="attr *"/> </attributes> </DOCUMENT> <_TO_REL ...> <_ATTRS attr_pattern="attr 1,attr 2,attr 3" node_name="attributes"/> </_TO_REL> <_FROM_REL ...> <_ATTRS attr_regex="attr .*" node_name="attributes"/> </_FROM_REL> <_OBJ ...> <_ATTRS attr_pattern="attr *" node_name="attributes"/> </_OBJ> <_OBJ ...> <_ATTRS node_name="attributes"/>attr 1,attr 2,attr 3</_ATTRS> </_OBJ>
Result
These examples produce the following output (given attributes attr 1
, attr 2
and attr 3
for each object or relationship):
<attributes> <attr_1>[attr 1 value]</attr_1> <attr_2>[attr 2 value]</attr_2> <attr_3>[attr 3 value]</attr_3> </attributes>
name_attr
<DOCUMENT ...> <attributes> <_ATTRS attr_pattern="attr *" node_name="attr" name_attr="name"/> </attributes> </DOCUMENT>
Result
<attributes> <attr name="attr 1">[attr 1 value]</attr> <attr name="attr 2">[attr 2 value]</attr> <attr name="attr 3">[attr 3 value]</attr> </attributes>
|