EitanBlumin / CRUDE-ASP

Low Code Application Generator in Classic ASP, with MSSQL Database, Bootstrap, Fontawesome, and jQuery. Based on the AdminLTE web template.
https://git.eitanblumin.com/CRUDE-ASP/
Mozilla Public License 2.0
24 stars 13 forks source link

New Field Type: XML #105

Open EitanBlumin opened 5 years ago

EitanBlumin commented 5 years ago

Implement new field/parameter type: XML Editing the field would either be done using a regular TextArea input, or a SummerNote control with code highlighting (if supported).

Displaying the field should be simple enough using a combination of javascript and jquery. Specifically, this should be a good starting point:

var xml = (new DOMParser()).parseFromString(xmlText,'text/xml');

It theoretically would also be possible to either make use of the jstree library, or using the built-in Bootstrap controls (such as collapsible accordion).

Additionally, it should be preferable to add a new field to portal.DataViewField which would be used to configure the schema for the XML object (i.e. something like XSLT). This schema should create constraints on the manipulations a user can perform on the XML document. For example: Which elements they can add, which attributes, what values, etc.

EitanBlumin commented 5 years ago

This should be a decent start, at least for displaying values at first:

http://www.levmuchnik.net/Content/ProgrammingTips/WEB/XMLDisplay/DisplayXMLFileWithJavascript.html