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?

XMLTOXML

Description

This function transforms XML using a given XSL. It takes the general form: 

XMLTOXML(xml,xsl,result)

Where:

 XML is to be transformed using XSL. 

Given: 

XSL CONTENTS

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="person">
<p><xsl:value-of select="name" /></p>
</xsl:template>
</xsl:stylesheet>

XML CONTENTS

<list>
<person>
<name>Bob</name>
</person>
<person>
<name>Amy</name>
</person>
<list>

An example of use is as: 

XML_VAR = XMLTOXML(xml, xsl, rc)
CRT XML_VAR

to display: 

<p>Bob</p><p>Amy</p>


If result=0, XML_VAR will contain a transformed version of xml using xsl.

If result=1, XML_VAR will hold an error message.


Go back to jBASE BASIC.

Was this article helpful?