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

문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top