Tritium (programming language)
Tritium is a simple scripting language for efficiently transforming structured data like HTML, XML, and JSON. It is similar in purpose to XSLT but has a syntax influenced by jQuery, Sass, and CSS versus XSLT's XML based syntax. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
Tritium is a simple scripting language for efficiently transforming structured data like HTML, XML, and JSON. It is similar in purpose to XSLT but has a syntax influenced by jQuery, Sass, and CSS versus XSLT's XML based syntax. Select all HTML nodes that are table elements with ID foo. The $$() function takes a regular CSS selector $$("table#foo") { # change the width attributes to "100%" attribute("width", "100%") } While Tritium supports both XPath and CSS selectors via the $() and $$() functions (respectively), the preferred usage is XPath. For example, the above code rewritten to use the equivalent XPath selector would be: Select all HTML nodes that are table elements with ID foo. The $() uses XPath $("//table[@id='foo']") { # change the width attributes to "100%" attribute("width", "100%") }
Cite this
"Tritium (programming language)". 1788531964. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1373212615 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy