Logo Smartsite Logo Smartsite
  • Smartsite Releases
  • Smartsite Manager
  • User Manual
  • Features & Modules
  • Install & Config
  • Advanced
  • SXML
Smartsite Documentatie > SXML > Examples > Macro Examples > Native Xml > Set result to a node value
Smartsite SXML CopyCode image Copy Code
<se:xmlprocessor resultformat="-{string.toupper(this.result())}-">
    <se:parameters>
        <se:parameter name="xml">
            <div>
                <span>
                    -Hello World-
                </span>
            </div>
        </se:parameter>
        <se:parameter name="actions">
            <se:collection>
                <se:member query="/div/span">
                    {this.setresult(string.trim(this.getvalue()))}
                </se:member>
            </se:collection>
        </se:parameter>
    </se:parameters>
</se:xmlprocessor>
Example Result CopyCode image Copy Code
--HELLO WORLD--
SXML
  • Macro
  • Macro Parameters
  • Macro Parameter Properties
  • Vipers
  • SXML Data Types
  • Examples
    • Macro Examples
      • Add-On Module Macros
      • Smartlet Examples
      • Configuration macros examples
      • Formatting Examples
      • Native Xml
        • Populating a DataTable
        • Get typed node value
        • Read Binary Data Example
        • Build XML document
        • Delete nodes
        • Set result to a node value
        • XPath on document with multiple default namespaces
        • Adding an attribute to an element
        • Using explicit default namespace in XPath query
        • Read and process RSS feed using Embed and XmlProcessor
        • Consume Google Weather API
        • XmlProcessor action with condition Example
        • Populating a DataTable using an existing data structure
      • Branching and Flow Macros
      • DataTable Macros
      • Utility Macros
      • Miscellaneous Macros
      • Advanced Macros
    • Viper Examples
    • Macro Shared Parameter Examples
    • Razor Examples
  • Tips & Tricks

Wat is Smartsite? www.smartsite.nl