Jul 20, 2023

Convert an XML file into C struct/string declarations

xml2c reads in an XML file and produces equivalent C source code, suitable for #including in your program. The C version is probably easier deal with in your code. You don’t have to read and parse the XML file and then look for the nodes you want; instead you just loop through a bunch of structs. Or maybe you just don’t want to distribute extra files with your app, and would rather build them into the executable.

Checkout these related ports:
  • Zbase32 - Base32 Encoder/Decoder
  • Ytnef - Unpack data in MS Outlook TNEF format
  • Yj - Convert between YAML, TOML, JSON, and HCL
  • Yj-bruceadams - Command line tool that converts YAML to JSON
  • Xdeview - X11 program for uu/xx/Base64/BinHex/yEnc de-/encoding
  • Wkhtmltopdf - Convert HTML (or live webpages) to PDF or image
  • Uulib - Library for uu/xx/Base64/BinHex/yEnc de-/encoding
  • Uudeview - Program for uu/xx/Base64/BinHex/yEnc de-/encoding
  • Unix2dos - Convert ASCII newlines between CR/LF and LF
  • Tuc - Text to Unix Conversion
  • Trans - Character encoding converter generator
  • Tnef - Unpack data in MS Outlook TNEF format
  • Ta2as - TASM to AT&T asm syntax converter (GNU AS)
  • Showkey - Display cooked key sequences (keycap-to-keystrokes mappings)
  • Rubygem-xdr - XDR Helper Library