Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
XmlHelper..::.OverrideElement Method (IXmlElement, IXmlElement, String)
XmlHelper Class See Also

Oracle® Coherence .NET API Reference Release 3.6.1
E18812-01
Override the values of the specified base element with values from the specified override element.

Namespace: Tangosol.Run.Xml
Assembly: Coherence (in Coherence.dll) Version: 3.6.1.0 (3.6.1.0)

# Syntax

C#
    public static void OverrideElement(
    	IXmlElement xmlBase,
    	IXmlElement xmlOverride,
    	string idAttrName
    )

#### Parameters

xmlBase
  Type: Tangosol.Run.Xml..::.IXmlElement
  Base IXmlElement.

xmlOverride
  Type: Tangosol.Run.Xml..::.IXmlElement
  Override IXmlElement.

idAttrName
  Type: System..::.String
  Attribute name that serves as an identifier allowing to match elements with the same name; if not specified all attributes have to match for an override.

# Remarks

The values are only overriden if there is an exact match between the element paths and an attribute value for the specified attribute name. Empty override values are ignored. Override elements that do not match any of the base elements are just copied over. No ambiguity is allowed.
For example, if the base element has more then one child with the same name and the specified attribute's value then the override is not allowed.

# Exceptions

Exception | Condition
--- | ---
System..::.InvalidOperationException | If the base element is immutable or there is ambiguity between the override and base elements.

# See Also

XmlHelper Class
OverrideElement Overload
Tangosol.Run.Xml Namespace