Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 10th, 2005, 01:39 AM
Authorized User
 
Join Date: Dec 2004
Location: hyderabad, Andhra Pradesh, India.
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
Reply With Quote
  #2 (permalink)  
Old February 10th, 2005, 04:23 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
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...

Reply With Quote
  #3 (permalink)  
Old February 11th, 2005, 01:59 AM
Authorized User
 
Join Date: Dec 2004
Location: hyderabad, Andhra Pradesh, India.
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
Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 11:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.