Responsive web Framework

DOCUMENTATION

Dataxchg

Utility for group information transformation of similar html code

NOT AVAILABLE FOR TINY SCREENS

(minimum width: 480px)

Purpose

In many cases, it is necessary to insert repetitive code or to meet similar characteristics, such as a series of hidden values to be passed as a parameter, or a list of radio buttons in order for the user to choose one of these options.

The purpose of this library is to save time by allowing the sending of a structure (array, hash, hash of arrays) and the system to convert that information to XML or HTML.

Description

Functions for manipulating XML:

hash2Xml(strct,str)
It receives a struct and returns an XML with a specified root element (name). Otherwise this will have the value ofdata.
xml2Hash(xml)
Reverse operation. Receive an XML and return an equivalent structure (arr_, ah_, ha_, hash_).

Functions for manipulating HTML:

param2Hidden(hash)
It receives a hash and converts it to a list of input fields of the hidden type.
param2Get(hash)
It receives a hash and converts it into a string to be passed as a GET parameter.
ah2NavList(ah_navitems)
Converts the returned value
ah2List(ah,id,name,class)
Get an array of hashes (ah) and convert it to an ordered list of items (<ol/>). The last three parameters are optional.
ah2RadioList(ah,id,name,class)
Get an array of hashes (ah) and convert it to an ordered list of radio buttons (<ol/>). The last three parameters are optional.
ah2CheckboxList(ah,id,name,class)
Get an array of hashes (ah) and convert it to an ordered list of checkbox boxes (<ol/>). The last three parameters are optional.
ah2Select(ah,id,name,class)
Get an array of hashes (ah) and convert it to a select type list The last three parameters are optional.