XML to XML using XSLT

Joined
Aug 18, 2011
Messages
1
Reaction score
0
Hi i need to convert the xml to xml

inut xml is

<associds>
<associd>
<associdentifierValue>12345</associdentifierValue>
<associdtype>AAA</associdtype>
</associd>
<associd>
<associdentifierValue>24688</associdentifierValue>
<associdtype>BBB</associdtype>
</associd>
</associds>

expected out is if child element value is BBB - i need to remove the whole element in associd.

<associds>
<associd>
<associdentifierValue>12345</associdentifierValue>
<associdtype>AAA</associdtype>
</associd>
</associds>


XSLT is given below, but it is removing only associdtype is BBB , i need to remove entire parent. i need as soon as possible.. Thanks in advance.


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dp="http://www.datapower.com/extensions"
extension-element-prefixes="dp"
exclude-result-prefixes="dp">

<xsl:eek:utput method="xml"/>

<!-- Confidential#1 access-denied fields-->

<xsl:template match="associdtype[.='BBB']">
</xsl:template>
<!-- Rest of the response fields are allowed to pass from service output -->

<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
 
Joined
Sep 16, 2011
Messages
2
Reaction score
0
Has anybody manage to do this but using XSL:FO?

I am wanting to achieve the same results, but output to a PDF.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top