Assembly Editor
Building Assemblies

HTTP, XML, and XPath

3min

Building assemblies in the assembly editor requires some knowledge of HTTP, XML, and XPath.

For an introduction to HTTP, see here.

For an introduction to XML, see here.

For an introduction to XPath, see here.

Supported XPath functionality

Assembly modules that process XML provide dropdowns to select nodes and attributes based on XPaths that are automatically parsed from the module's input data streams:

Document image


You can edit these XPaths manually if needed, when the automatically parsed XPaths don't select needed nodes.

The system does not support all XPath functionality within the assembly modules, however. Only a subset of overall XPath functionality is available.

Given this sample XML:

Document image


This is the available XPath functionality that can be used within assembly modules:

myXML/person[1]

Just the first "person" node.

Homer

myXML/person

All the "person" nodes

Homer, Marge, Montgomery

myXML/person[2-3]

"person" nodes 2 to 3 inclusive

Marge, Montgomery

myXML/person[2-]

"person" nodes 2 and onwards

Marge, Montgomery

myXML/person[-2]

"person" nodes up to and including 2

Homer, Marge

myXML/person[@show]

All "person" nodes that have a "show" attribute

Homer, Marge, Montgomery

myXML/person[@show = 'simpsons']

All "person" nodes that have a "show" attribute which equals "simpsons" (compare is case-sensitive)

Homer, Marge, Montgomery

myXML/*/firstname

All "firstname" nodes under any node in "myXML"

Homer, Marge, Montgomery

myXML/person[1]/@show

The "show" attribute of the first "person" node

simpsons

myXML/person[1]/lastname/text()

The text of the "lastname" node of the first "person" node

Simpson

myXML/person/last()

The number of "person" nodes

3



If you need more XPath functionality than is possible within the pre-built baseline modules, then you should use the Extension - Server-Side Script module and write Java JSP code that uses the VTD-XML parser to process the XML as needed.