Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract xsi:nil="true"

Status
Not open for further replies.

sat88

Technical User
Aug 14, 2012
1
GR
Hello,

I would like to extract the xsi:nil="true" in the xml output...

I have the following sample of xml

i.e.

<?xml version="1.0"?>
<xml catalog="DD" date="13/08/2012" time="14:48:40" version="1.1">
<catalog>
<num id="Number" prec="4"/>
<str id="cc" len="4"/>
<num id="vv" prec="4"/>
<num id="bb" prec="4"/>
</catalog>
<row>
<num id="Number">1</num>
<str id="cc">aaaa</str>
</row>
<row>
<num id="Number">2</num>
<str id="vv">vvvv</str>
</row>
<row>
<num id="Number">3</num>
<str id="bb">uuuu</str>
</row>
</xml>


The following part is from xsl:

<xsl:if test="Number">


<xsl:element name="AAA" xmlns:xsi=" xsi:nil="true">
<xsl:value-of select=".">...</xsl:value-of>
</xsl:element>

The result:

<AAA></AAA>

The expected result:

<AAA xsi:nil="true"></AAA>


Your help will be valuable...

Thank you in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top