Click here to Skip to main content
15,891,423 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Regular Expression or strin manipulation Pin
Abhijit Jana3-Dec-09 18:49
professionalAbhijit Jana3-Dec-09 18:49 
CoderOnline wrote:
I Have a string

<parameters>
<userprofilestate>0
<parameter>
<name>Report_Parameter
.....
......


The string that you have mentioned is nothing but XML String. So My suggestion is that please don't thing about to use String Manipulation Or Regx to get the particular value.

So, what you can is, convert the XML string to XMLDocument and easily use XPath to find out the value of particular tag :

Here is one sample example :

XPathDocument Xdoc = new XPathDocument(XMLFile);
XPathNavigator Xnav = Xdoc.CreateNavigator();
XPathExpression expression; 
expression= nav.Compile("/Parameters/Parameter/Name");
XPathNodeIterator Xiterator = Xnav.Select(expr);


Now using Xiterator, you can easily get the value Smile | :) .

This will help you for all kind of search over the XML String.

Let me if you have any doubts regarding the same.

Thanks !!

Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.

GeneralRe: Regular Expression or strin manipulation Pin
CoderOnline3-Dec-09 19:44
CoderOnline3-Dec-09 19:44 
AnswerRe: Regular Expression or strin manipulation Pin
sashidhar3-Dec-09 21:42
sashidhar3-Dec-09 21:42 
GeneralRe: Regular Expression or strin manipulation Pin
CoderOnline3-Dec-09 21:52
CoderOnline3-Dec-09 21:52 
GeneralRe: Regular Expression or strin manipulation Pin
sashidhar3-Dec-09 21:59
sashidhar3-Dec-09 21:59 
QuestionSSRS Deployment Support Pin
siddisagar3-Dec-09 17:20
siddisagar3-Dec-09 17:20 
AnswerRe: SSRS Deployment Support Pin
Abhijit Jana3-Dec-09 19:14
professionalAbhijit Jana3-Dec-09 19:14 
AnswerRe: SSRS Deployment Support Pin
sashidhar3-Dec-09 22:06
sashidhar3-Dec-09 22:06 
QuestionDynamically creating aspx Form Pin
dharam_hbtik3-Dec-09 17:02
dharam_hbtik3-Dec-09 17:02 
AnswerRe: Dynamically creating aspx Form Pin
Abhijit Jana3-Dec-09 18:36
professionalAbhijit Jana3-Dec-09 18:36 
QuestionVisual Web Studio or Dreamweaver for website layout/design? Pin
James Shao3-Dec-09 12:14
James Shao3-Dec-09 12:14 
AnswerRe: Visual Web Studio or Dreamweaver for website layout/design? Pin
Kannan Ar3-Dec-09 15:15
professionalKannan Ar3-Dec-09 15:15 
AnswerRe: Visual Web Studio or Dreamweaver for website layout/design? Pin
N a v a n e e t h3-Dec-09 16:57
N a v a n e e t h3-Dec-09 16:57 
QuestionProblem with calling Javascript when using UpdatePanel AJAX Pin
Faisal Khatri3-Dec-09 9:25
Faisal Khatri3-Dec-09 9:25 
AnswerRe: Problem with calling Javascript when using UpdatePanel AJAX Pin
Petr Pechovic3-Dec-09 11:14
professionalPetr Pechovic3-Dec-09 11:14 
GeneralRe: Problem with calling Javascript when using UpdatePanel AJAX Pin
Faisal Khatri4-Dec-09 5:10
Faisal Khatri4-Dec-09 5:10 
QuestionJavascript in HTML interacting with PDF Javascript Pin
Ennis Ray Lynch, Jr.3-Dec-09 8:10
Ennis Ray Lynch, Jr.3-Dec-09 8:10 
QuestionCreating HTML Page with XSLT and XML Pin
FJJCENTU3-Dec-09 7:02
FJJCENTU3-Dec-09 7:02 
AnswerRe: Creating HTML Page with XSLT and XML Pin
Abhishek Sur3-Dec-09 11:26
professionalAbhishek Sur3-Dec-09 11:26 
GeneralRe: Creating HTML Page with XSLT and XML Pin
FJJCENTU3-Dec-09 13:04
FJJCENTU3-Dec-09 13:04 
GeneralRe: Creating HTML Page with XSLT and XML Pin
Abhishek Sur3-Dec-09 23:38
professionalAbhishek Sur3-Dec-09 23:38 
GeneralRe: Creating HTML Page with XSLT and XML Pin
FJJCENTU4-Dec-09 5:17
FJJCENTU4-Dec-09 5:17 
GeneralRe: Creating HTML Page with XSLT and XML Pin
Abhishek Sur6-Dec-09 20:52
professionalAbhishek Sur6-Dec-09 20:52 
Questiondoesn't exist in the current context. Pin
FEMDEV3-Dec-09 6:29
FEMDEV3-Dec-09 6:29 
AnswerRe: doesn't exist in the current context. Pin
Gamzun3-Dec-09 8:20
Gamzun3-Dec-09 8:20 

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.