Help Center

CXmlWriter.WriteElementStringmethod

Writes out an element with the specified prefix, name, namespace, and value.

File Managementmethoddocumented

Syntax

FUNCTION WriteElementString (BYVAL pwszPrefix AS LPCWSTR, BYVAL pwszLocalName AS LPCWSTR, BYVAL pwszNamespaceUri AS LPCWSTR, BYVAL pwszValue AS LPCWSTR) AS HRESULT

Parameters

NameDescription
pwszPrefixThe namespace prefix of the element. NULL is equivalent to an empty string.
pwszLocalNameThe local name of the element. NULL will result in an error.
pwszNamespaceUriThe namespace URI of the element. NULL is equivalent to an empty string.
pwszValueThe value of the element. NULL indicates that there is no content to write. In contrast, an empty string indicates that this element has an empty value.

Return value

Returns S_OK if no error is generated.

Description

Writes out an element with the specified prefix, name, namespace, and value.

Example

pWriter->WriteElementString(NULL, "myElement", NULL, "myValue")

Reference

  • Defined in AfxNova/CXmlLite.inc:828
  • Documented in File Management/CXmlLite Class.md
  • Topic: CXmlLite Class