#xmllint — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #xmllint, aggregated by home.social.
-
Turns out, I can use `xmllint` to clean up a lot of files… this reads the file in, in whatever charset it is, pretty-prints it out in UTF-8 to a new file, then if successful, renames the new file over the old one.
```
for f in *.xml; do xmllint --encode UTF-8 --format ${f} > ${f}.new && mv ${f}.new ${f}; done
``` -
Turns out, I can use `xmllint` to clean up a lot of files… this reads the file in, in whatever charset it is, pretty-prints it out in UTF-8 to a new file, then if successful, renames the new file over the old one.
```
for f in *.xml; do xmllint --encode UTF-8 --format ${f} > ${f}.new && mv ${f}.new ${f}; done
``` -
I tried validating #Docbook v5 using #xmllint from #libxml2 via #RelaxNG and #Schematron but wasn't successful. The RNG validation threw unexpected errors and the Schematron validation threw an internal error. It could be my source file, but it seems fine. Does somebody here have a working setup or tips to share?
-
I tried validating #Docbook v5 using #xmllint from #libxml2 via #RelaxNG and #Schematron but wasn't successful. The RNG validation threw unexpected errors and the Schematron validation threw an internal error. It could be my source file, but it seems fine. Does somebody here have a working setup or tips to share?
-
Is it me or is there no way to prevent #xmllint from loading external #XML entities in an XML document? I’ve been trying to find a command-line switch to disable that entirely but to no avail. There’s the --nonet option, but it only disables remote XML entity loading and I can still include /etc/passwd in my output.
Does it mean that any program calling the xmllint utility from #libxml2 (e.g. a shell script) is vulnerable to XML external entity injection?