check if attribute with a specific value is present in zip/node using zip-filter library or another one

StackOverflow https://stackoverflow.com/questions/15918987

Domanda

am new at clojure and would like to know how to check if an attribute with a specific value is present in a zip/node using the zip-filter library.

Let us say I have the following xml content in a file named "myfile.xml"

<node1>
  <node2>
      <specialnode type="blabla">
  </node2>
</node1>

let us say I have the zipper corresponding to the xml structure shown above,

How can I just test (true or false) if there is a node named "specialnode" with an attribute having the value "blabla"??

Any help would be appreciated. Regards. Horace

È stato utile?

Soluzione

Try this tutorial. The only thing is that the library has moved to https://github.com/clojure/data.zip.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top