Edit XML Node

Edits a node value or its attribute in a given file. Select the appropriate node using Xpath expression. The action will edit the first node if Xpath evaluates to more than one node.

AWE's XML actions require a basic understanding of XML and related terms, such as XPath, DTD and XSLT.

Declaration

<AMXMLEDITNODE XPATH="text" XMLATTRIBUTE="text" NEWVALUE="text" />

Example

Edit XML node at XPath location "/BookStore/Book". Session name is "XMLSession1". Edit first node(s).

<AMXMLEDITNODE XPATH="/BookStore/Book" NEWVALUE="Who moved my Cheese" />

See Also: Create XML Node, Delete XML Node, End XML Session, Evaluate Xpath Expression, Extract XML Fragment, Merge XML Files, Output XML, Read XML Node, Sign XML Document, Start XML Session, Transform XML, Validate XML File, Verify XML Document, XML Node to Dataset

General Tab

Property

Type

Required

Default

Markup

Description

XPath Expression

Text

Yes

(Empty)

XPATH="/BookStore/Books/Price"

The Xpath expression to the XML node in which to edit.

Attribute (optional)

Text

No

(Empty)

XMLATTRIBUTE="Price"

Tells the XML node the value of the attribute to edit.

Value

Text

No

(Empty)

NEWVALUE="NewValue"

The XML node's attribute to edit.

Edit Node

Text (options)

No

First

EDITNODE="All"

Specifies whether the first node or all nodes are to be edited. The available options are:

  • First (default) - The first node will be edited.

  • All - All nodes will be edited.

Session Name

Text

No

(Empty)

SESSIONNAME="FirstXMLSession"

The session name to identify the in-memory XML document to use in subsequent XML steps. This allows several in memory XML documents to be active simultaneously.