tax

Tree API for XML

tax

Tree API for XML Bindings for libXML2 Tree API

Installation

Add this to your application's shard.yml:

dependencies:
  tax:
    github: vonKingsley/tax

Usage

require "tax"
doc = Tax::Document.new
root = Tax::Element.new("root")
namespace = Tax::NS.new("abc", "uri:tax:code")
parent = Tax::Element.new("parent", namespace, ns_define: true) 
child = Tax::Element.new("child", namespace)

parent.add_child(child)
root.add_child(parent)
doc.root = root
#=><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n  <abc:parent xmlns:abc=\"uri:tax:code\">\n    <abc:child/>\n  </abc:parent>\n</root>\n

Contributing

  1. Fork it ( https://github.com/vonKingsley/tax/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

tax

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • almost 5 years ago
  • September 30, 2017
License

MIT License

Links
Synced at

Mon, 18 Nov 2024 04:26:29 GMT

Languages