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
```

#xml #charset #xmllint

XML Abfragen

Es gibt viele Möglichkeiten, um XML-Dateien auszulesen und abzufragen. Hier findet ihr eine davon.

#XML #Query #Abfrage #Xpath #Xmllint #Linux

https://gnulinux.ch/xml-abfragen

XML Abfragen

Es gibt viele Möglichkeiten, um XML-Dateien auszulesen und abzufragen. Hier findet ihr eine davon.

GNU/Linux.ch
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?

#security

How to ask VLC what's currently playing

(Target audience: command-line fans on something Unixy, who have or will be able to find bash, vlc, curl and xmllint.) My preferred metho...

@opensuse #YaST sprint makes language selection switching easier, fixes #xmllint message & looks to backport the changes, and improves AutoYaST command-line interface - https://bit.ly/30rH8AX
Digest of YaST Development Sprint 101

As explained in our previous blog post, this YaST development report is presented as a collection of links to Github’s pull requests