Project

xembly

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Command Line XML Manipulator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

= 0.8.23
= 7.0.0
= 5.14.4
= 6.3.2
= 1.19.1

Runtime

= 1.12.3
= 13.0.6
= 4.4.1
 Project Readme

Managed by Zerocracy DevOps By Rultor.com We recommend RubyMine

Build Status Build status 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.