Timeline for Generate HTML/XML in Python?
Current License: CC BY-SA 4.0
Post Revisions
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 19, 2021 at 1:54 | vote | accept | poundifdef | ||
| Dec 19, 2021 at 1:52 | history | edited | Zach Young | CC BY-SA 4.0 |
made question more general; small format change
|
| Dec 19, 2021 at 1:47 | answer | added | Zach Young | timeline score: 3 | |
| Dec 19, 2021 at 0:24 | answer | added | Tim Roberts | timeline score: -1 | |
| Dec 19, 2021 at 0:22 | comment | added | poundifdef | For my application, I am parsing an existing tree data structure and converting it to an HTML representation. It seemed like the most straightforward thing would be to generate an HTML tree structure using an existing library, and then use that to render the final HTML. I could write my own, if that is required, but it would be nice if I could use an existing solution. | |
| Dec 19, 2021 at 0:20 | comment | added | poundifdef |
I am using the xml module because it was mentioned in this answer, however, I'm open to using a different library. stackoverflow.com/questions/6748559/…
|
|
| Dec 19, 2021 at 0:19 | comment | added | Tim Roberts |
ElementTree is not the right tool for generating HTML. HTML is more free-form than XML. There are many template processors available that would be a better choice (jinja2, Cheetah, Django). Is there some reason you don't just want to generate strings here?
|
|
| Dec 19, 2021 at 0:17 | comment | added | martineau |
XML ≠ HTML so why are you using xml module?
|
|
| Dec 19, 2021 at 0:12 | history | asked | poundifdef | CC BY-SA 4.0 |