Skip to content

Antti Juustila

Mostly about programming

  • About
  • Tietoja
  • Apps

Month: February 2021

Stripping XML

xmlstarlet ed -N d="http://www.w3.org/2005/Atom" -N c="urn:oasis:names:tc:emergency:cap:1.2" -d "d:feed/d:entry/d:content/c:alert/c:info/c:area/c:polygon" fmi-alerts.xml > fmi-stripped.xml

I tried to make sense of a very, very large XML file with repeating elements of hundreds and hundreds of GPS coordinates, among other elements.

Luckily I found xmlstarlet. Installation was easy with homebrew. I just specified the namespaces and the elements to remove. The original 20Mb XML file was stripped to mere 140kb. Much easier to read!

Author anttiPosted on 2021-02-222021-03-29Categories CodingTags xml, xmlstarlet

advent of code algorithms aoc aoc2024 app apps Binary search tree book C c++ c++std client-server code database data structures demo dictionary git Java jq JSON localization network performance pizza programming red wine remote work router security skills slippery weather std::thread swift swift-doc swiftui Swing teaching testing threads useless watchos weather WinAPI xml

  • December 2025
  • October 2025
  • September 2025
  • June 2025
  • May 2025
  • January 2025
  • December 2024
  • July 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • July 2023
  • June 2023
  • May 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • September 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • About
  • Tietoja
  • Apps
Antti Juustila Proudly powered by WordPress