Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

DYNTOXML

Description

This function converts an array to an xml representation of the array. An optional transform may be included as a second argument. It takes the general form: 

DYNTOXML(array,xsl,result)

Where:

Array is the variable to be converted.

The function takes the contents of the dynamic array, and returns a generic XML representation of that array or an error (result=0 OK; result<>0 Bad);

An example of use is as:  

      a = "Tom" : @AM : "Dick" : @AM : "Harry"
      xml = DYNTOXML(a,"",result)
      CRT xml

 to display the following to the screen. 

 <?xml version="1.0" encoding ="ISO-8859-1"?>
<array>
<data attribute="1" value="1" subvalue="1">Tom</data>
<data attribute="2" value="1" subvalue="1">Dick</data>
<data attribute="3" value="1" subvalue="1">Harry</data>
</array>


Go back to jBASE BASIC.

Was this article helpful?