C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




XML Related Problem --PLz Help


Posted Date: 04 Jul 2007      Total Responses: 1

Posted By: John       Member Level: Gold     Points: 2


<title>
<resource_ref id="token3"/>
</title>
<resource_ref id="token1"/>
<resource_ref id="token4"/>
<resource_ref id="token2"/>
<resource_ref id="token5"/>
<resource_ref id="token1">
<resource_token key="value_of_var_inside_token_1" value="this is the token value"/> <resource_token key="value_of_var_inside_token_2" value="this is the token value"/>
</resource_ref>
<resource_ref id="token5"/>
<resource_ref id="token1">
<resource_token key="value_of_var_inside_token_1" value="this is the token value"/>




1. I need to select the
“<resource_ref>”
tag such that no other tag between the closing and ending </resource_ref> tag should be selected. Like, </title> tag should not be selected.

2. All the child tags should be selected.

################## The Regular Expression Used By me is ::
[<]\b(resource_ref)(?:\W+\w+){0,}?\W+(/>+)





Responses

Author: Nagasai    05 Jul 2007Member Level: BronzeRating:     Points: 2
Try using this

XmlNode xList = xmlNode.SelectSingleNode("resource_ref");
and get them in Dataset like this..

DataSet ds = new DataSet();
ds.ReadXml(new StringReader(xList.OuterXml.ToString())));
and its all yours now...
Let me know if it didnt work



Post Reply
You must Sign In to post a response.
Next : Database connectivity issue
Previous : How to throw an exception from mysql database stored procedure
Return to Discussion Forum
Post New Message
Category: General

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it help desk

Contact Us    Privacy Policy    Terms Of Use