home.social

#xmllint — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #xmllint, aggregated by home.social.

fetched live
  1. 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

  2. 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

  3. XML Abfragen

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

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

    gnulinux.ch/xml-abfragen

  4. XML Abfragen

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

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

    gnulinux.ch/xml-abfragen

  5. 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?

  6. 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?

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