Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5
Syntax Tree support for XML
License
NotificationsYou must be signed in to change notification settings
ruby-syntax-tree/syntax_tree-xml
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Syntax Tree support for XML.
Add this line to your application's Gemfile:
gem"syntax_tree-xml"
And then execute:
$ bundle install
Or install it yourself as:
$ gem install syntax_tree-xml
From code:
require"syntax_tree/xml"ppSyntaxTree::XML.parse(source)# print out the ASTputsSyntaxTree::XML.format(source)# format the AST
From the CLI:
$ stree ast --plugins=xml file.xml(document (misc"\n"), (element (opening_tag"<","message",">"), (char_data"\n" +""), (element (opening_tag"<","hello",">"), (char_data"Hello"), (closing_tag"</","hello",">")), (char_data"\n" +""), (element (opening_tag"<","world",">"), (char_data"World"), (closing_tag"</","world",">")), (char_data"\n"), (closing_tag"</","message",">") ))
or
$ stree format --plugins=xml file.xml<message><hello>Hello</hello><world>World</world></message>
or
$ stree write --plugins=xml file.xmlfile.xml 1ms
Bug reports and pull requests are welcome on GitHub athttps://github.com/ruby-syntax-tree/syntax_tree-xml.
The gem is available as open source under the terms of theMIT License.
About
Syntax Tree support for XML
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.