Click or drag to resize
XmlReaderReadElementContentAsString Method (String, String)
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a String object.

Namespace: System.Xml
Assembly: CSharpXamlForHtml5.System.Xml.dll (in CSharpXamlForHtml5.System.Xml.dll.dll) Version: 1.0.0.0
Syntax
C#
public virtual string ReadElementContentAsString(
	string localName,
	string namespaceURI
)

Parameters

localName
Type: SystemString
The local name of the element.
namespaceURI
Type: SystemString
The namespace URI of the element.

Return Value

Type: String
The element content as a String object.
Exceptions
ExceptionCondition
InvalidOperationExceptionThe XmlReader is not positioned on an element.
XmlExceptionThe current element contains child elements.-or-The element content cannot be converted to a String object.
ArgumentNullExceptionThe method is called with null arguments.
ArgumentExceptionThe specified local name and namespace URI do not match that of the current element being read.
See Also