Salesforce

XMLSetNS (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

XMLSetNS (Magic xpa 2.x)

Associates an alias with a namespace URI for the root element.

Syntax:

XMLSetNS (generation, I/O entry, alias, URI)

Parameters:

generation – A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.

I/O entry – A number that represents the sequence number of the I/O entry in the current task.

alias – An alphanumeric string representing the name of the namespace alias. The string must begin with an alpha character. If this string is empty, Magic xpa uses the default namespace.

URI – An alphanumeric string representing a namespace URI. An empty URI is not valid.

Returns:

0 when the operation has been successful. If an error occurred, this function returns one of the following error codes:

-3 – The I/O file not opened in Write mode

-12 – Alias already used

-13 – Invalid alias, qualified name

For a full list of error codes, see XML Error Codes.

Exceptions:

This function is not supported for Rich Client tasks.

Example:

XMLSetNS(0, 1, '', 'http://www.magicsoftware.com/mgns') defines a default XML namespace with

URI - http://www.magicsoftware.com/mgns

XMLSetNS(0, 1, 'al1', 'http://www.magicsoftware.com/mgns') defines an XML namespace with URI - http://www.magicsoftware.com/mgns and alias - al1

See also:

XML Namespaces

XML Error Codes

The Online and Rich Client Samples projects (program XM12 and RXM12)

Reference
Attachment 
Attachment