Hello,
yes this is correct. However, I would avoid SPath expressions as long as they became not necessary. The reasons are:
- Structure Path expressions create structure nodes based on the schema of the document (memory resources).
- They require more evaluation steps (/Property/xapp:seq(1)/ContactPersons is longer than /Property/ContactPersons
- They are X-Application specific.
When should you use them?
- To iterate/address anonymous schema structures, e.g.
...
<xs:element name='X'>
<xs:complexType>
<xs:sequence maxOccurs='unbounded'>
<xs:element name='A' type="xs:string" />
...
<xs:element name='F' type="xs:string" />
</xs:seqeunce>
</xs:complexType>
</xs:element>
...
Within this case, using SPath you can very easily iterate the sequence “A B … F” .
My tip for you: Use the SPath only when another way without them is not possible or to complex.
Stupidly, the generator creates a lot of SPath expressions. For the next version of X-Application we will optimize its output for it uses SPath expression only if they are required.
Bye,
Christian.
#webMethods#Tamino#API-Management