Search users(string) in XML

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 25
Reputation: luckyads is an unknown quantity at this point 
Solved Threads: 0
luckyads luckyads is offline Offline
Light Poster

Search users(string) in XML

 
0
  #1
Jan 14th, 2009
I have generated an XMl which goes like this -

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <users>
  3. <user>
  4. <name>aditi</name>
  5. <password>A802CEDA2B04377E3265FC30C3D7CE9F4FADBEA0</password>
  6. <firstname>aditi</firstname>
  7. <lastname>aditi</lastname>
  8. <usertype>1</usertype>
  9. </user>
  10. <user>
  11. <name>aditi</name>
  12. <password>A802CEDA2B04377E3265FC30C3D7CE9F4FADBEA0</password>
  13. <firstname>aditi</firstname>
  14. <lastname>aa</lastname>
  15. <usertype>1</usertype>
  16. </user>
  17. <user>
  18. <name>aditi</name>
  19. <password>6C8C90F3860019AB48FDFC3F7541291B333B7B4B</password>
  20. <firstname>aditi</firstname>
  21. <lastname>aa</lastname>
  22. <usertype>1</usertype>
  23. </user>
  24. </users>

Now, I want to login using this XML, so it should search for the <name> element. How can it be done>

Thanks,
Aditi
Last edited by peter_budo; Jan 14th, 2009 at 7:20 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 130
Reputation: sedgey is on a distinguished road 
Solved Threads: 8
sedgey's Avatar
sedgey sedgey is offline Offline
Junior Poster

Re: Search users(string) in XML

 
0
  #2
Jan 15th, 2009
What you ask is possible and you could use LINQ to achieve it, by running a LINK query on your XML document. The question is should you do this?

The Web.config file was designed to hold this kind of data and also to protect it, keeping your login data like this could be a security risk for your application.
David Ridgway: so little daylight, too much caffeine
MCSD MCAD MCSE
http://web2asp.net
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC