Official Content

Writes an element with the indicated value, using namespaces.

Syntax

&DataType.WriteNSElement(LocalName [ ,NameSpaceURI [ ,Value ] ] )

Where:
LocalName
   Local Name of the element to be written

NameSpaceURI
   URI of namespace

Value
   Value of the element to be written

Scope

Extended data types: XMLWriter Data Type
Generators: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

Description

This method is equal to the WriteElement method, but using namespaces.

The prefix is automatically determined, based on the defined prefixes in the element’s environment. If no prefix is associated to the specified URI, a name space is defined by default along with the element.

Samples

WriteNSElement(‘Price’, ’20.5’,‘http://www.genexus.com’)

Generates the following:

prefix:Price  20.5   /prefix:Price or
Price xmlns=” [http://www.genexus.com/|http://www.genexus.com]”   20.5   /Price

See Also

XMLWriter Data Type
WriteNSStartElement method







Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant