T4S4  19.1 C8540 A23673
Teamcenter Gateway for SAP S/4HANA API Reference
PXM Namespace Reference

Functions

 getTagSeg4Id plmxml ObjectType Id
 Function search for a specific tag based on the id. e.g.: set TagString [getTagSeg4Id $PlmxmlString AssociatedAttachment id1873] will return, if it is available in the PlmxmlString: <AssociatedAttachment id="id1873" attachmentref="#id1874" role="IMAN_master_form"> More...
 
 getTagSeg4Type plmxml ObjectType SubObjectType
 Searches for the specified ObjectType XML segment, the first match is returned otherwise an empty string is returned. More...
 
 getValue XmlString AttributeName
 This function returns the attribute value of given XML Node. More...
 
 setFormAttributeValue plmxml AttributeName AttributeValue
 sets the UserData value of a Form tag via the xdom APIs and returns the updated XML tag of the Form. More...
 

Function Documentation

◆ getTagSeg4Id()

PXM::getTagSeg4Id   plmxml ObjectType Id  

Function search for a specific tag based on the id. e.g.: set TagString [getTagSeg4Id $PlmxmlString AssociatedAttachment id1873] will return, if it is available in the PlmxmlString: <AssociatedAttachment id="id1873" attachmentref="#id1874" role="IMAN_master_form">

Remarks
For a more detailed functionality you should use the xdom parser functionality, because that is much more flexible.
Deprecated:
Please use the xdom parser code instead.
Parameters
plmxmlPLMXML input string
ObjectTypeObject type name (e.g. Form, Item, Occurrence or ProcessOccurrence)
IdPMLXML Object Id

◆ getTagSeg4Type()

PXM::getTagSeg4Type   plmxml ObjectType SubObjectType  

Searches for the specified ObjectType XML segment, the first match is returned otherwise an empty string is returned.

Remarks
For a more detailed functionality you should use the xdom parser functionality, because that is much more flexible.
Deprecated:
Please use the xdom parser code instead.
Parameters
plmxmlPLMXML input string
ObjectTypeObject type name (e.g. Form, Item, Occurrence or ProcessOccurrence)
SubObjectTypeSub-object type name for the specified ObjectType name (e.g MEConsumed)
Returns
XML string containing the found XML object element or an empty string if nothing was found.

◆ getValue()

PXM::getValue   XmlString AttributeName  

This function returns the attribute value of given XML Node.

Deprecated:
Please use the xdom parser code instead.
Parameters
XmlStringXML input string
AttributeNameAttribute name that is used to get the corresponding tag value.
Returns
Returns the found value of the XML Node attribute or an empty string.

Same code using the xdom parser

1 set AttributeValue ""
2 set Doc [xdom parse $XmlString]
3 set Node [$Doc firstChild]
4 if {[$Node hasAttribute $AttributeName]} {
5  set AttributeValue [$Node getAttribute $AttributeName]
6 } else {
7  #
8  # Error case
9  #
10 }

◆ setFormAttributeValue()

PXM::setFormAttributeValue   plmxml AttributeName AttributeValue  

sets the UserData value of a Form tag via the xdom APIs and returns the updated XML tag of the Form.

Remarks
For a more detailed functionality you should use the xdom parser functionality, because that is much more flexible.
If the AttributeName is not found the returned XML string will be the same as the provided PLMXML String.
Deprecated:
Please use the xdom parser code instead.
Parameters
plmxmlPLMXML String
AttributeNameName of the Form attribute of the corresponding UserData/UserValue tag
AttributeValueNew value of the specified Form attribute.
Returns
XML Stream containing the updated PLMXML tags