[MarkLogic Dev General] Empty Results

Kapoor, Pragya PKapoor1 at innodata.com
Fri Mar 27 04:53:09 PDT 2015


Hi,


I want to remove the empty result element from the dynamic xml.


For example:

In the below xml, I want to exclude the element(which has no values) The element name are not fixed as this xml is dynamically created.


Exclude the below exlemnt

   <result>
            <Currency/>
        </result>


dynamic.xml:

<report>
    <columns>
        <title>Currency</title>
    </columns>
    <results>
        <result>
            <Currency/>
        </result>
        <result>
            <Currency/>
        </result>
        <result>
            <Currency/>
        </result>
        <result>
            <Currency>Pound sterling</Currency>
        </result>
        <result>
            <Currency/>
        </result>
        <result>
            <Currency>Pound sterling</Currency>
        </result>
    </results>
</report>


Excepted output:

<report>
    <columns>
        <title>Currency</title>
    </columns>
    <results>
?            <Currency>Pound sterling</Currency>
        </result>
        <result>
            <Currency>Pound sterling</Currency>
        </result>
    </results>
</report>

Thanks
Pragya


"This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150327/a89247fa/attachment.html 


More information about the General mailing list