[This is preliminary documentation and is subject to change.]
A convenience function to get the value of a <property>
defined by the first child element of the specified node that has a
matching tag name. This routine is often used to obtain properties that
are organized into named groups (e.g. <database-settings>,
<transport-settings>, etc.)
For example, to lookup a property named "user" of a top-level
<database-settings> element,
GetProperty( getRootNode(), "database-settings", "user", "sa" );
| C# | Visual Basic | Visual C++ |
public virtual string GetProperty( XmlElement node, string element, string property, string defaultValue )
Public Overridable Function GetProperty ( _ node As XmlElement, _ element As String, _ property As String, _ defaultValue As String _ ) As String
public: virtual String^ GetProperty ( XmlElement^ node, String^ element, String^ property, String^ defaultValue )
- node (XmlElement)
- The parent node to search
- element (String)
- The tag name of the element to search for (it must be a non-repeating child of the parent node)
- property (String)
- The name of the property
- defaultValue (String)
- The value to return if the property is not found
The property value