Read HTML in Progress4GL - html

Is there a library or a way to read HTML files in Progress4GL?
I want to read a HTML file specifically a <table> tag within in, and capture that data as a list of items in a temp-table.
This website offers a way of converting the HTML table to a CSV file, but if possible I want to do this within my ABL session.

I eventually found a solution to this by using the INPUT STREAM FROM statement and creating a temp-table record for each line of the HTML file.
https://help.consultingwerkcloud.com/openedge/117/rfi1424920545278.html

Related

how to retrieve the data from xml and display it in table in html

I wanted to develop a small search website where I will be storing the data in XML files. When we search anything, it should display those data as table format in html. How does one retrieve the data from XML files?
Below is the basic thing to display data of only two columns, but I want to display data dynamically:
html file:http://www.w3schools.com/xml/xml_applications.asp
This is the sample code for retrieving the data from xml only for two columns.
Well the first problem I see is that you have two functions in there that are not being called. Nothing programmatic will happen in this scenario. When you have a method you need to call said method with myFunction(). I would recommend reading up a little more on javascript instead of copying and pasting it and expecting it to just "work"
To further elaborate, you removed the function call from the example you took when you took off the button. What is your xml endpoint? (it's not going to be the same as the example unless you build it to be that way). In this example it's just an xml file that is hosted on the server with the same root as the html.

Drop-down list from a txt file

I want to know if it is possible to create a Drop-down list in HTML using Only a txt file?
I have a list of places/countries, instead of creating for each, can i import it somehow from a txt file while each country is set in a single line?
(i know how it's done using php, i just wonder if it could be done without it)
Using pure html? No.
You will either need to use a preprocessor (sed,perl,etc) to generate the html page or a dynamic language to do it at run time - html is a static language.
You should be able to do it with javascript, but the only way I can think of involves making the txt file available on the web and using a XMLHttpRequest() to get it. There is the new file api in html5, but that is aimed at local (to the client) files.

How do I download contents of an html table generated by play 1.2.7 backend on java in xls

I've generated a table using play's #{list} tag and get pretty decent results. Now I need to be able to generate and download an xls version of the table and have no idea what to do. Any pointers at all will be much appreciated
Well you have various options.
Excel will open HTML files. So instead of rendering your table as HTML you can it to stream it to the browser and set the content type as XLS.
While Excel will open it this it will still be an HTML file rather than an XLS(X) document.
You can generate as CSV from your data model and stream this to the browser. Again this will be a CSV rather than a proper XLS(X) document.
There also seem to be some solutions around which can do it using Javscript. See as a starting point: Generate excel sheet from html tables using jquery
Finally you can can use something like Apache POI or JXLS to generate a 'proper' xls(x) document and stream this to the browser. I have some code here that will export HTML to 'proper' xlsx file if this is the route you wish to go. Workflow is then to create some HTML from your data model and use this to convert to Excel rather than having to programmatically build the Excel document using POI. https://github.com/alanhay/html-exporter

How to create a XML file using JSP/HTML and XSLT

I've already created some html code using a XML file and based on a XSLT template.
Howerver, this time I need to create an inverse process (i.e., based on HTML code, create a XML file).
Plus, I need to create some quiz like:
Personal Info
Name:___
Age:____
etc... with input tags and stuff like that in a JSP file (or HTML). Then, after an user interaction and click on submit, this form need to create a XML file with this schema
<Personal Info>
<name>...</name>
<age>...</age>
...
</Personal Info>
In the future, this XML doc will be inserted in Form attribute on Java, through Controller, and persisted in database.
Thanks
João Vicente
One way is to use java script for reading the user inputs from html and build xml.

how to export array (array collection) data into an html table or text file

Hey all,
I have an array collection of strings and integers (which I have displayed in a data grid) and I am wondering if it is possible to export the array collection into an html table? or even a text file for the user to download
I found some pages that had an export to .xls files but I want to stray away from that for now.
Thanks in advance!
Yes, you can export a DataGrid to an HTML table or a text file.
But you'll have to write your own conversion routine to do so. If you want the user to download a file, you'll most likely need to send the data back to the server and have that server process it; then send the user a download link.