WriteAttributeStringWithPrefix method

void WriteAttributeStringWithPrefix(
  1. String namespacePrefix,
  2. String localName,
  3. String? stringValue
)
Writes the attribute value. The namespace prefix. The local name of the attribute. The String value.

Implementation

void WriteAttributeStringWithPrefix(
    String namespacePrefix, String localName, String? stringValue) {
  try {
    this._xmlWriter!.WriteAttributeString(
        prefix: namespacePrefix,
        localName: localName,
        ns: null,
        value: stringValue);
  } on ArgumentException catch (ex, stacktrace) {
    // XmlTextWriter will throw ArgumentException if String includes invalid characters.
    throw new ServiceXmlSerializationException(
        "InvalidAttributeValue($stringValue, $localName)", ex, stacktrace);
  }
}