Any way to "collapse all" all nodes in one click in firefox or chrome and then able to search a node's name and then quickly see its path/tree of parent nodes? First collapse not just top node, but all child nodes, and when I search for a node then it opens only that tree of nodes. I want this because I search a node in a big xml file. The node is present many times under different paths of parent nodes and I need to see the path of the node where ever it appears. Right now I have to manually traverse whole file and collapse many times to find all paths of that node that is present many times in a file. Any quick way of doing it?
To collapse all XML nodes in Chrome, execute this in your JavaScript console
var nodes = document.getElementsByClassName("button collapse-button");
for (var i = 0; i < nodes.length; i++) {
nodes[i].click();
}
If firefox or chrome are not a strict requirement, I suggest geany, in particular its pretty-printer plugin. With it you can simply format the file in a human-friendly way, fold and un-fold all elements in a single click and so on.
If you are on debian or ubuntu:
sudo apt-get install geany geany-plugin-prettyprinter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With