- 4 minutes to read

XPath on Wrapped XPath search field expression type plugin

Easily extract unique values from embedded or wrapped XML content using the Nodinite XPath on Wrapped XPath Search Field Expression Plugin. This page shows you how to configure, test, and use this plugin with clear input, configuration, and result examples.

✅ Extract single or multiple unique values from embedded XML in large messages
✅ Use high-performance streaming XPath extraction for large XML documents
✅ Designed for high performance and self-service log views


What is the XPath on Wrapped XPath Plugin?

The Nodinite XPath on Wrapped XPath plugin lets you extract one or more unique values from wrapped XML elements and attributes in the payload of Log Events. Use it to process messages where XML is embedded within XML, and you need to target specific data.

  • Extract single or multiple unique values from embedded XML
  • Use XPath expressions as defined by W3C
  • High-performance streaming reader supports large XML documents

Use this plugin for extracting values from embedded XML content using XPath.


How It Works: Input → 1st XPath Expression → 2nd XPath Expression → Result

Each example below clearly separates the Input (XML message), the 1st XPath Expression (to select wrapped XML), the 2nd XPath Expression (to extract values from wrapped XML), and the Result (output value).


Quick Example

Input:

<Orders>
<Order>&lt;Id&gt;101&lt;/Id&gt;</Order>
<Order>&lt;Id&gt;102&lt;/Id&gt;</Order>
</Orders>

1st XPath Expression:

Orders/Order

2nd XPath Expression:

Id

Result:

101
102

Examples

Example 1: Extract Order IDs from Embedded XML

Input:

<ns0:Orders xmlns:ns0="Common.Schemas/Nodinite/1.0">
    <Order>&lt;Id&gt;101&lt;/Id&gt;</Order>
    <Order>&lt;Id&gt;102&lt;/Id&gt;</Order>
</ns0:Orders>

1st XPath Expression:

Orders/Order

2nd XPath Expression:

Id

Result:

101
102

Test Expression
Valid expression with state output, unique values, and total count.


Features

  • Extract single or multiple unique values from embedded XML in messages (payload)
  • Use XPath expressions for advanced extraction
  • High-performance streaming reader supports large XML documents
  • Designed for small and large payloads

Note: This plugin uses a high-performance, read-only, fast-forward-only stream reader. Not all types of XPaths can be evaluated due to the forward-only nature.


How to Use

  1. Select the 'XPath on Wrapped XPath' expression type plugin when configuring a Search Field.
  2. Enter the 1st XPath expression to select the wrapped XML content.
  3. Enter the 2nd XPath expression to extract the desired value(s) from the wrapped XML.
  4. Finalize the configuration and select the Message Types to apply the expression.
  5. Optionally, perform a re-index operation (Add or manage Search Field).

Extracted values are stored for as long as the Message Type retention is configured.


Test Expression

You can test your configuration in the 'Test Expression' tab when setting up a Search Field:

  1. Enter a sample payload in the 'Message Body' tab
  2. Select the 'XPath on Wrapped XPath' plugin
    SelectXPathOnWrappedXPathPlugin
    Here's an example selecting the 'XPath on Wrapped XPath' expression type plugin.
  3. Enter the 1st and 2nd XPath expressions
  4. Review the output and adjust as needed

If the expression is valid, you will see the unique values and total count:

Test Expression
Valid expression with state output, unique values, and total count.

If the expression is invalid or does not match any data, you will see:
No Result
Example of an invalid expression yielding no result.



Mermaid Diagram: Search Field Expression Flow

This diagram shows how the XPath on Wrapped XPath plugin fits into the overall search field expression process.

graph LR subgraph "Search Fields" sf(fal:fa-magnifying-glass-plus Order Number) end subgraph "Search Field Expressions" sfe(fal:fa-flask XPath on Wrapped XPath plugin) end subgraph "MessageTypes" mt1(fal:fa-file Orders) end sf --- sfe sfe ---|Expression| mt1

Next Step


Learn More