Transforming XML to table

Note: this forum software thinks that ASPdotNet (with a real dot) is a link and as a beginner won’t let me use the real dot.

I want to transform XML into a HTML table and I am not sure how much of that that Jekyll and related tools can help.

I am converting an existing personal website to a GitHub Pages site and I intend to use the custom domain name for the GitHub Pages site. The current site uses ASPdotNet but it is actually static; the only ASPdotNet content is in one page that has a table of printers, generated from a XML file. The data is old but might still be useful. The page in the ASPdotNet site is Printers. I am using an ASPdotNet XmlDataSource and GridView to format the XML into a table. I know a little about XSLT files and tools such as that. Would an experienced Jekyll developer use XSLT to transform the XML into Jekyll markdown or is there a better way? I know (client-side) JavaScript is a possibility.

Maybe someone else can chime in if there is some undocumented XSLT feature, but to my knowledge Jekyll does not support XSLT.

You will have to put your static XML files in the _data folder and read them from there.

You will use standard HTML or markdown to create your tables (or html and CSS for grid views or flex grids). You will use the Liquid programming language to generate data from the XML file.

I created a series of Jekyll videos that show you how to use data. Here is a link to the one that shows you how to work with XML and other customers data, but if you are new to Jekyll, you might want to peruse the whole playlist.

I am watching your video and I think it helps.

I am a beginner to Jekyll but I have been doing computers for half a century so I have a head start on concepts.

I do not see a way to send members private messages and I have an off-topic comment. For tabs in VS Code there is a feature that I think is new. In the lower-right look for something like Spaces: 4. Click it and I think you will get an option to use tabs.

Your video got me started, thank you. I do not see where it says anything about XML. Does Liquid support XML in a manner equivalent to YAML? I cannot find anything saying it does.

Do you know why this is an issue? It is because I was wrong. I’m so sorry. I was so busy working on an XML project that integrates data using GitHub Actions that I allowed myself to think Jekyll supports XML. Ugh sorry again :frowning:

Okay now that I sent you down the wrong path, I will point you to the file types Jekyll supports:

If you can, I recommend outputting your XML data to a supported format, with JSON or YAML being your best choices.

where did the xml come from? is this a one time thing? you could just copy the table that has already been rendered if it is a one time thing. I assume it isn’t, just throwing that out there.

Since your video introduces what I can do using JSON it is worthwhile.

Since I found no evidence of Liquid supporting XML I expected that I need to convert the data. It is likely there is a converter for going from XML to YAML but I prefer JSON; it is more universal. JSON is also well-documented.

I forget what I used to edit (create) the data. There is probably a database somewhere I used to create it. The data is more than three years old. If I update the data then I will import it into a database and write a program to update it. I wish I could find what I used years ago but this would be a good project for developing my online database (“CRUD”) programming experience.