XML Molecule

From oWiki

Jump to: navigation, search

Contents


Preference Dialog

Image:Xml_pref.png

Attributes

type

string  ( r )
Type of this molecule, 'xml'.

pref.name

string  ( r )
The scriptable name for this molecule. This name can be set using rename method dynamically.

parser

object  ( r )
The build-in XML parser

generator

object  ( r )
The build-in XML generator. See CCRxXMLGenerator.

validator

object  ( r )
The build-in XML validator. See CCRxXMLValidator.

transformer

object  ( r )
The build-in XML transformer. See CCRxXMLTransformer.

xml

string  ( r, w )
Get/Set the xml text.


Methods

rename(n)

n: string

Rename this molecule.

clone()

Return: a molecule

Create a clone of this molecule.

attach(droplet)

droplet: a droplet object (e.g. app.box.droplet)

Attach this molecule to a droplet.

detach()

Remove this molecule from its droplet.

deleteMod()

Delete this molecule.

serialize()

Return: string

Serialize this molecule into its JSON representation.

setXSLT( url )

url: string

Set the URL of the XSLT document.

setXSD( url )

url: string

Set the URL of the XSD document.

validate()

Return: 0 if validated correctly, otherwise -1.

Validate the xml document using the XSD specified by setXSD(url).

transform()

Return: the transformed xml document.

Transform the xml using the XSLT specified by setXSLT(url) call.

Comments

The XML parser is based on the XML for SCRIPT implementation, document can be found here.

Personal tools