Sha256: e715b7fc2bab2118449eae628f3c5880091691a0dd9d88d8a73fc40f12584218

Contents?: true

Size: 1.93 KB

Versions: 4

Compression:

Stored size: 1.93 KB

Contents

[![Made By Teamed.io](http://img.teamed.io/btn.svg)](http://www.teamed.io)
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/xembly-gem)](http://www.rultor.com/p/yegor256/xembly-gem)
[![We recommend RubyMine](http://img.teamed.io/rubymine-recommend.svg)](https://www.jetbrains.com/ruby/)

[![Build Status](https://travis-ci.org/yegor256/xembly-gem.svg)](https://travis-ci.org/yegor256/xembly-gem)
[![Build status](https://ci.appveyor.com/api/projects/status/8e5dsjjemymfg510?svg=true)](https://ci.appveyor.com/project/yegor256/xembly-gem)
[![Gem Version](https://badge.fury.io/rb/xembly.svg)](http://badge.fury.io/rb/xembly)
[![Dependency Status](https://gemnasium.com/yegor256/xembly-gem.svg)](https://gemnasium.com/yegor256/xembly-gem)
[![Code Climate](http://img.shields.io/codeclimate/github/yegor256/xembly-gem.svg)](https://codeclimate.com/github/yegor256/xembly-gem)
[![Coverage Status](https://img.shields.io/coveralls/yegor256/xembly-gem.svg)](https://coveralls.io/r/yegor256/xembly-gem)

## Assembly for XML

Read this [blog post](http://www.yegor256.com/2014/04/09/xembly-intro.html)
and check this project: [yegor256/xembly](https://github.com/yegor256/xembly)

## How to Install?

You will need Ruby 2.0+:

```bash
$ gem install xembly
```

## How to Run?

Run it locally and read its output:

```bash
$ xembly --help
```

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

```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!

Full specification of Xembly language is
[here](https://github.com/yegor256/xembly).

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
xembly-0.4.2 README.md
xembly-0.4.1 README.md
xembly-0.4 README.md
xembly-0.3 README.md