Project

xembly

0.0
No release in over a year
Command Line XML Manipulator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

= 1.16.2
= 13.1.0
= 4.10.1
 Project Readme

DevOps By Rultor.com We recommend RubyMine

Gem Version Maintainability Test Coverage

Xembly is assembly for XML.

Read this blog post and check this project: yegor256/xembly

To install, you will need Ruby 2.0+:

$ gem install xembly

Then, run it and read its output:

$ xembly --help

Say, you want to modify an existing XML document, which is in the file doc.xml:

<books>
  <book isbn="0735619654">Object Thinking</book>
  <book isbn="1519166915">Elegant Objects</book>
</books>

Now, say, you want to add one more book there:

$ xembly --xml doc.xml 'XPATH "/books"; ADD "book"; ATTR "isbn", "0201379430"; SET "Object Design";'
<books>
  <book isbn="0735619654">Object Thinking</book>
  <book isbn="1519166915">Elegant Objects</book>
  <book isbn="0201379430">Object Design</book>
</books>

Simple as that!

The full specification of Xembly language is here.