Click here to Skip to main content
15,899,754 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: How to Create an XML Editor application tool in C#.NET Pin
debobrata19-Aug-08 4:46
debobrata19-Aug-08 4:46 
AnswerRe: How to Create an XML Editor application tool in C#.NET Pin
tptshepo19-Aug-08 9:12
tptshepo19-Aug-08 9:12 
AnswerRe: How to Create an XML Editor application tool in C#.NET Pin
blackjack215019-Aug-08 20:21
blackjack215019-Aug-08 20:21 
GeneralRe: How to Create an XML Editor application tool in C#.NET Pin
debobrata20-Aug-08 0:27
debobrata20-Aug-08 0:27 
QuestionMore than one xsd for a xml validation Pin
vicky0000017-Aug-08 20:36
vicky0000017-Aug-08 20:36 
QuestionHow to generate XML File from table Pin
Abdullah S. Abdelhay17-Aug-08 11:14
Abdullah S. Abdelhay17-Aug-08 11:14 
AnswerRe: How to generate XML File from table Pin
tptshepo19-Aug-08 20:50
tptshepo19-Aug-08 20:50 
Questionxsl not formating xml file correctly into csv file Pin
CodingLover15-Aug-08 16:54
CodingLover15-Aug-08 16:54 
Hi all,

I want to collect some data(not all) from an xml file and write them into a csv file. I used a xsl file formatting for that. Here is my xml file content.



<br />
<?xml version="1.0" encoding="ISO-8859-1"?><br />
<MAIN><br />
<CATALOG><br />
    <PLANT Tag="no"><br />
    <LIGHT>Time may differ</LIGHT><br />
        <PRICE>$2.44</PRICE><br />
    </PLANT><br />
    <PLANT Tag="no"><br />
    <LIGHT>Fixed time</LIGHT><br />
        <PRICE>$9.37</PRICE><br />
    </PLANT><br />
</CATALOG><br />
<CHAT><br />
    <SOME>Some Text</SOME><br />
    <MORE>More Text</MORE>    <br />
</CHAT><br />
</MAIN><br />
<br />


I want to get data on CATALOG element. So here is my style sheet.

<br />
<?xml version="1.0"?><br />
<xsl:stylesheet version = "1.0"<br />
    xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"><br />
  <xsl:output method="text"/><br />
  <!--<xsl:strip-space elements = "CATALOG"/>--><br />
  <xsl:template match="/MAIN/CATALOG/PLANT"><br />
    <!--<xsl:text/><xsl:value-of select="normalize-space(PLANT)"/>"<xsl:text/>--><br />
    <xsl:value-of select="normalize-space(LIGHT)"/>";"<xsl:text/><br />
    <xsl:value-of select="normalize-space(PRICE)"/>" <xsl:text/><br />
    <xsl:text disable-output-escaping = "yes" ></xsl:text><br />
  </xsl:template><br />
</xsl:stylesheet><br />


But what happened here is, data on CHAT element also added to the file. I only want data on <LIGHT> and <PRICE> elements. But my style sheet gives data on <SOME> and <MORE> elements. How can I correct this.

Please help me too fix this. I'm stuck with this for two days.

Thanks

I appreciate your help all the time...
CodingLover Smile | :)

QuestionThe 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' element is not declared Pin
That's Aragon14-Aug-08 0:57
That's Aragon14-Aug-08 0:57 
QuestionHow to define the font types in xsl output. Pin
CodingLover14-Aug-08 0:06
CodingLover14-Aug-08 0:06 
QuestionHow to convert an xml file to sql table by C# ? Pin
kakaleyte13-Aug-08 21:22
kakaleyte13-Aug-08 21:22 
AnswerRe: How to convert an xml file to sql table by C# ? Pin
That's Aragon14-Aug-08 1:09
That's Aragon14-Aug-08 1:09 
GeneralRe: How to convert an xml file to sql table by C# ? Pin
kakaleyte14-Aug-08 1:22
kakaleyte14-Aug-08 1:22 
GeneralRe: How to convert an xml file to sql table by C# ? Pin
That's Aragon14-Aug-08 1:39
That's Aragon14-Aug-08 1:39 
AnswerRe: How to convert an xml file to sql table by C# ? Pin
kakaleyte14-Aug-08 1:40
kakaleyte14-Aug-08 1:40 
AnswerRe: How to convert an xml file to sql table by C# ? Pin
Cosby26-Aug-08 21:56
Cosby26-Aug-08 21:56 
QuestionHow to edit the single value in xml using xsl Pin
ThangamSundar13-Aug-08 18:31
ThangamSundar13-Aug-08 18:31 
QuestionXSD output (Enforcing XML Closing Tags) Pin
tranzformerz13-Aug-08 12:51
tranzformerz13-Aug-08 12:51 
AnswerRe: XSD output (Enforcing XML Closing Tags) Pin
tranzformerz13-Aug-08 13:44
tranzformerz13-Aug-08 13:44 
QuestionTransform to convert True to true? Pin
Ed K13-Aug-08 8:04
Ed K13-Aug-08 8:04 
QuestionHow to Add new Xml Node Pin
salmonraju13-Aug-08 2:57
salmonraju13-Aug-08 2:57 
AnswerRe: How to Add new Xml Node Pin
PIEBALDconsult13-Aug-08 18:13
mvePIEBALDconsult13-Aug-08 18:13 
QuestionHow to write a XSD for the xml have the node name have Full colon Pin
vicky0000013-Aug-08 1:04
vicky0000013-Aug-08 1:04 
QuestionXSLT stylesheets and Reporting Services Pin
Tracy N12-Aug-08 19:03
Tracy N12-Aug-08 19:03 
QuestionSome elements not showing any values [modified] Pin
Ekjon11-Aug-08 9:34
Ekjon11-Aug-08 9:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.