Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yegor256/xembly.rb
A command line tool for XML manipulations in Xembly, an imperative DSL
https://github.com/yegor256/xembly.rb
ruby ruby-gem xml xml-document
Last synced: 4 months ago
JSON representation
A command line tool for XML manipulations in Xembly, an imperative DSL
- Host: GitHub
- URL: https://github.com/yegor256/xembly.rb
- Owner: yegor256
- License: mit
- Created: 2016-03-19T17:13:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-23T04:42:13.000Z (9 months ago)
- Last Synced: 2024-05-23T07:48:56.818Z (9 months ago)
- Topics: ruby, ruby-gem, xml, xml-document
- Language: Ruby
- Homepage: https://www.xembly.org
- Size: 116 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/xembly.rb)](http://www.rultor.com/p/yegor256/xembly.rb)
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)[![Gem Version](https://badge.fury.io/rb/xembly.svg)](http://badge.fury.io/rb/xembly)
[![Maintainability](https://api.codeclimate.com/v1/badges/f26349e81b04628d8bf7/maintainability)](https://codeclimate.com/github/yegor256/xembly.rb/maintainability)
[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/xembly.rb.svg)](https://codecov.io/github/yegor256/xembly.rb?branch=master)Xembly is 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)To install, you will need Ruby 2.0+:
```bash
$ gem install xembly
```Then, run it and read its output:
```bash
$ xembly --help
```Say, you want to modify an existing XML document, which is in the file `doc.xml`:
```xml
Object Thinking
Elegant Objects```
Now, say, you want to add one more book there:
```
$ xembly --xml doc.xml 'XPATH "/books"; ADD "book"; ATTR "isbn", "0201379430"; SET "Object Design";'Object Thinking
Elegant Objects
Object Design```
Simple as that!
The full specification of Xembly language is
[here](https://github.com/yegor256/xembly).