Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
any one know about xml injection, please explain about xml injection with one sample coding asap. i search in google i do one example but hoe to validate the input i dont know?

thanks in advance
Posted
Updated 15-Feb-12 20:28pm
v2
Comments
Herman<T>.Instance 16-Feb-12 3:32am    
pick any of the next links.
Ramanathan Narayanan 16-Feb-12 3:39am    
have u know about xml injection in asp.net

1 solution

XmlNode Xmlnode;
XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath("your xml file"));
Xmlnode = root.SelectSingleNode(@"//users/savings[LoginID/text()=' " + UName + " and passwd/text()=' " + Pwd + " ']/cardno/text()");

Input:

give the
<b>user name : <b>' or 1=1</b>
password : test123 given correctly.</b>


Xml injection is simillar like sql Injection
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900