Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 10th, 2005, 02:39 AM
Authorized User
 
Join Date: Dec 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kk_katepally Send a message via Yahoo to kk_katepally
Default create xml file using c#

how can i create a xml file containing 2 records using c# and i have to retrive rows checking condition using XSLT?
consider records of employee. icondtions are on based salary.
i am asking this i dont have any idea abt xslt.


bye
"Hell, there are no rules here, we are here to accomplish something" BY
Thomas Alva Edison

kittu
__________________
kittu
 
Old February 10th, 2005, 05:23 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Create StringBuilder to create an XML if you are going to use it for retrieving purpose only..
(eg)
    StringBuilder strXML = new StringBuilder()
    strXml.Append("<Employees>");
    strXml.Append("<Employee>");
    strXml.Append("<Name>Thomas</Name>");
    strXml.Append("<Age>25</Age>");
    strXml.Append("<Salary>25000</Salary>");
    strXml.Append("</Employee>");
    strXml.Append("</Employees>");

XSLT sample:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
    <xsl:for-each select="Employees/Employee">
             <xsl:if test="salary = 25000">
                  //Do whatever you want
             </xsl:if>
    </xsl:for-each>
</xsl:template>
Hope this will help you...

 
Old February 11th, 2005, 02:59 AM
Authorized User
 
Join Date: Dec 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kk_katepally Send a message via Yahoo to kk_katepally
Default

Thank You very much shanti.
u solved my problem.
Hope we keep in touch.

Regards,
carlos
bye
tc

"Hell, there are no rules here, we are here to accomplish something"
by
Thomas Alva Edison





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create XML file from SLQ Server2000 using vbScript ilearn XML 1 September 5th, 2008 02:32 AM
Create XML file - add elements according to range remya1000 XML 5 October 3rd, 2007 02:50 PM
Create XML file - According to the Value, add elem remya1000 General .NET 0 October 2nd, 2007 11:03 PM
Create a new XML file with vbscript sswingle XML 4 April 24th, 2006 07:31 AM
Problem to create an xml file from two xml files saurabh_inblore XSLT 1 April 12th, 2006 02:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.