%dw 2.0
ns ns0 urn:ns0
ns ns1 urn:ns1
ns ns2 urn:ns2
output application/xml writeNilOnNull=true
---
{
  result:
  {
    a: in0.user.@dni,
    b: in0.user[@dni],
    c: in0.user.@ns0#dni,
    d: in0.user[@ns0#dni],
    e: in0.user.name.@[?($$ ~= "code")],
    f: in0.user.name[@ns1#code],
    g: in0.user.name[@ns2#code],
    h: in0.user.name.@*code[0],
    i: in0.user.name.@,
    j: in0.user.@,
    k: in0.user.@not,
    l: in1.root.store.book[0].@country,
    m: in1.root.store[?($$ ~= "book")] mapObject {"country": $.@country},
    n: in1.root.store[?($$ ~= "book")] filterObject $$.@country == "USA",
    o: country: in1.root.store.*book.@country,
    p: {(in1.root.store..&author)},
    q: in1.root.store.bicycle.price.@currency,
    r: in1.root.@,
    s: using (books = in1..*book[?($.@country == "ARG")]) books[0].@
  }
}