XUPDATE(1p)

πŸ“¦
version 0.6.0 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ XUPDATE(1p) β€” like, the whole vibe ✨

okay bestie, sit DOWN, because we're talking about xupdate, a lil program from the User Contributed Perl Documentation corner of the universe πŸ’–. It's giving "I process XUpdate commands over an XML document" and honestly? iconic.


🌸 NAME 🌸

xupdate β€” Process XUpdate commands over an XML document πŸ¦‹


πŸ’… SYNOPSIS πŸ’…

xupdate [options] <xupdate-file> <input-file>

 Options:
   -u | --usage        print brief help on usage
   -h | --help         print documentation

   -n | --namespace prefix=namespace-uri
                       associate a namespace with a prefix for use
                       in XPath selections in XUpdate file
                       (this option may occur several times)

   -k | --keep-ws      preserve whitespace in the XUpdate file
   -s | --strip-ws     strip ignorable whitespace from the input file
   -V | --version      print current version and revision
   -i | --indent       indent the output XML
   -j | --extra-indent like -i, but also adds a leading and a trailing
                       linebreak to every text node.

 but also put an extra newline after
 every start-tag and before every end-tag

so yeah, you hand it an xupdate-file and an input-file and it does the thing ✨ no cap.


πŸŽ€ OPTIONS πŸŽ€

  • --usage β€” Prints a lil brief help message on usage and then dips out. short and sweet, we love that for her πŸ’–
  • --help β€” Prints the manual page and exits. the full lore, basically πŸ“–
  • --namespace prefix=namespace-uri β€” Associates a namespace with a prefix, bestie. That prefix can then be used in the XPath selections inside the XUpdate file to address nodes of the source document that belong to that namespace. This is especially useful for mapping the default namespace to a prefix, because XPath by definition does not honour default namespaces 😭 (rude of it, honestly). You can use this option several times β€” stack 'em up, periodt πŸ‘‘
  • --keep-ws β€” Preserves any whitespace in the XUpdate file. The default behaviour is to remove all ignorable whitespace and any leading or trailing whitespace in all XUpdate command elements in the XUpdate file. so if you want your whitespace kept, you gotta say so 🫢
  • --strip-ws β€” Remove "ignorable" whitespace from the input file. The default behaviour is to keep any whitespace unless the --extra-indent (-j) option is used. Heads up though: whether that whitespace is present or not can affect results returned by some XPath expressions (like /foo/bar/text()[2]) 😳 so choose wisely
  • --version β€” Print the version and revision number of This program command and the version number of the XML::XUpdate library used. receipts, but for software 🧾
  • --indent β€” Indent the resulting document on output. pretty output supremacy ✨
  • --extra-indent β€” Indent the resulting document on output just like --indent, but also add a leading and a trailing linebreak to every text node. extra. we stan 🌈
  • --debug β€” Print some debugging information about commands being applied. for when you're nosy (affectionate) πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

This program will parse the given XUpdate file and the input file, and print the input file updated accordingly. That's the whole gig, and she does it well πŸ’œ

The XUpdate file format is described in the XUpdate Working Draft from 2000-09-14 β€” yes, the URL is literally http://www.xmldb.org/xupdate/xupdate-wd.html, go look, iykyk πŸ”₯


⭐ AUTHOR ⭐

Petr Pajas, pajas@matfyz.cz β€” the main character who made all this happen πŸ‘‘


Copyright 2002-2003 Petr Pajas, All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. free as in, go off, do your thing πŸ’–


okay that's the whole page bestie, you're officially educated πŸŽ“βœ¨

sign-off time: this lil gem is from perl v5.32.0, dated 2021-01-07, and it lives under the manual name XUPDATE(1p) πŸŽ€πŸ’…πŸ¦‹

πŸ“¦ where this page comes from