Bit of a late reaction, but there is nothing special about a tag with a
namespace prefixed. For example I have been using:
(zf/xml-> zipper :ListRecords :record :metadata :oai_dc:dc :dc:language
zf/text)
which works perfectly well.
Maurits
Op zondag 22 juli 2012 22:02:59 UTC+2 schreef Marcel Möhring het volgende:
>
> Hi,
>
> I am trying to parse an xpdl file. The problem for me is, that every tag
> is prefixed with xpdl namespace. The lookup from clojure.data.zip.xml
> always returns nil.
> (the same code works for non-prefixed XMLs)
>
> zipper:
> [{:tag :xpdl:Package,
> :attrs
> {:xmlns:xpdl "http://www.wfmc.org/2008/XPDL2.1",
> :xmlns "http://www.wfmc.org/2008/XPDL2.1",
> :xmlns:xsi "http://www.w3.org/2001/XMLSchema-instance",
> :Id "testPackage",
> :Name "Test-Package",
> :xsi:schemaLocation
> "http://www.wfmc.org/2008/XPDL2.1
> http://www.wfmc.org/standards/docs/bpmnxpdl_31.xsd"},
> ...
>
> code:
> (ns test.core
> (:require [clojure.zip :as zip]
> [clojure.xml :as xml]
> [clojure.data.zip.xml :as cdzip]))
>
> (def zipper (zip/xml-zip (xml/parse "res/testPackage.xpdl")))
>
> (cdzip/xml-> zipper :xpdl:Package)
> returns nil
>
> (cdzip/xml-> zipper (keyword "xpdl:Package"))
> also returns nil
>
> Does anybody know how to handle lookups in such XMLs?
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en