Follow

Is there a Python library for building XML/HTML like PHP's DOM?

· · Web · 3 · 0 · 1
@matrix BeautifulSoup? It's meant for parsing, but I think you can built out HTML using it too.

@djsumdog BeautifulSoup can only modify afaik

I found this but it seem a bit bloated
pypi.org/project/domonic/

@matrix Weird. You think there would be more libraries for something so basic. Depending on your usecase, you could create base templates and modify them with BeautifulSoup, or just pass in "<html><body></body></html>" to BF and build from there.

@realcaseyrollins Yeah, at that point I can just write it out as strings cause I don't need anything complicated

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.