XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 21st, 2011, 12:33 AM
hamanchi hamanchi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 8 hamanchi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 26 m 44 sec
Reputation Power: 0
XML parsing issue

Following is my xml which is generated by 3rd party, i was trying to render this xml via my xsl but problem is <param/> tag when i going to define in xpath like
I want to read the <label> which resides in <sub-category> for that purpose i am using xpath but i didn't get any result.
I believe that the problem is happen due to <params/> i do not know how to add this <params/> tag into my xsl
XML:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dynamic-data version="2.3" serial-number="201110192" name="index" xmlns="http://services.pangora.com/livexml">
    <params>
        <param name="poe">4</param>
    </params>
    <sub-categories-module>
        <params/>
        <sub-categories n="11">
            <sub-category n="5" total="5" nr-of-products="4132" nr-of-offers="177303" parent-cid="0" cid="52124">
                <label>Audio, Video & TV</label>
                <category nr-of-products="779" nr-of-offers="2094" parent-cid="61207" cid="47165">
                    <label>LCD TVs</label>
                </category>
                <category nr-of-products="289" nr-of-offers="2790" parent-cid="61122" cid="47091">
                    <label>MP3 Players & Media Players</label>
                </category>
                <category nr-of-products="284" nr-of-offers="3234" parent-cid="61161" cid="47124">
                    <label>Navigation Systems</label>
                </category>
                <category nr-of-products="321" nr-of-offers="3466" parent-cid="61207" cid="47163">
                    <label>Projectors</label>
                </category>
                <category nr-of-products="253" nr-of-offers="7800" parent-cid="61214" cid="47154">
                    <label>Hifi & TV Speakers</label>
                </category>
            </sub-category>
        </sub-categories>
    </sub-categories-module>
</dynamic-data>


XSL:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" omit-xml-declaration="yes"/>

  <xsl:template match="/">

        <xsl:apply-templates select="dynamic-data/sub-categories-module/sub-categories/sub-category" />

  </xsl:template>

  <xsl:template match="dynamic-data/sub-categories-module/sub-categories/sub-category">

  	<strong><xsl:value-of select="label" /></strong>

  </xsl:template>

</xsl:stylesheet>

Any help will be appreciable.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML parsing issue

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap