Defining a User View from an XML String

This following is an explanation of how to define a User View using an XML string, with no need for a Data Source.

To define the User View, create a Variable that contains the required XML string. The code sample below is a User View definition, in which ''my_variable'' is the Variable containing the XML string (note that ''EMBEDED'' is intentionally spelled with a single D):

Code Sample 1: User View Definition

"@{EMBEDED_XML} : SELECT @{my_variable}"

The following is an example XML prototype, which is the value of your Variable:

Code Sample 2: XML Prototype

<T nm="table name"><FD><F nm="colum name"/>...</FD><R><C>value</C>...</R>...</T>


Using an XML as the source of a User View allows you to utilize XML web services as your Data Sources (this normally requires writing a QLingo Extension that implements the web service call).

When a User View is created from an XML string, the Plan validation generates an error (for example, “Error: line 1 character 1: The "EMBEDED_XML" Data Source is not defined”). This error may be ignored.

See Also

User View XML Rules