Click here to Skip to main content
15,888,984 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: how do i read the specific tag ? Pin
George L. Jackson14-Apr-09 9:51
George L. Jackson14-Apr-09 9:51 
AnswerRe: how do i read the specific tag ? Pin
Perry Holman21-Apr-09 23:45
Perry Holman21-Apr-09 23:45 
GeneralRe: how do i read the specific tag ? Pin
George L. Jackson22-Apr-09 2:43
George L. Jackson22-Apr-09 2:43 
QuestionXML NODE Pin
kibromg8-Apr-09 0:15
kibromg8-Apr-09 0:15 
AnswerRe: XML NODE Pin
led mike8-Apr-09 5:17
led mike8-Apr-09 5:17 
QuestionLimit length (number of characters) returned in <%#XPath("description")%> ? Pin
cbvoss2-Apr-09 16:12
cbvoss2-Apr-09 16:12 
AnswerRe: Limit length (number of characters) returned in <%#XPath("description")%> ? Pin
cbvoss3-Apr-09 6:38
cbvoss3-Apr-09 6:38 
Questionneed to get data from xml to verify login Pin
faizych2-Apr-09 9:37
faizych2-Apr-09 9:37 
hi im doing a small project for friend.. i need to get the data out of xml so that i can verify the username and password
xml is like this

PLEASE HELP THE ERROR I GET IS EXPLAINED IN THE MIDDLE.. THANKS ALOTTTT

<clientlogind>
<client username="faizych">
Password="pass"
/>
<client username="taha89">
Password="pass78"
/>


and to get the value im doing

private void button1_Click(object sender, EventArgs e)
{
XmlDocument xmldoc = new XmlDocument();

xmldoc.Load("path.xml");

System.Xml.XmlNodeList client;
XmlNode clientNode = xmldoc.DocumentElement;

client = clientNode.SelectNodes("Client");

string Usernamttext = txtUsername.Text;
string passwordtext = txtpassword.Text;



foreach (XmlNode DataNode in client)
{

string userid;
string password;


************************************************************************************************
******* ERROR HERE*** now when i run it it gives me an error when it gets to the line below that """object reference not set to an instance of an object"""
*************************************************************************************************

userid = DataNode.SelectSingleNode("Username").InnerText.Trim();
password = DataNode.SelectSingleNode("password").InnerText.Trim();

if (string.Compare(Usernamttext, userid) == 0)
{
if (string.Compare(passwordtext, password) == 0)
{
break;
UserProfile UserProfileForm = new UserProfile();
UserProfileForm.usernamevalue = userid;
UserProfileForm.Show();
this.Close();

}
else
{
MessageBox.Show("Invalid Username or password");
}
}
}


}
AnswerRe: need to get data from xml to verify login Pin
Le centriste6-Apr-09 6:03
Le centriste6-Apr-09 6:03 
QuestionGroup XML by category Pin
blindcapt1-Apr-09 16:26
blindcapt1-Apr-09 16:26 
AnswerRe: Group XML by category Pin
led mike2-Apr-09 4:58
led mike2-Apr-09 4:58 
GeneralRe: Group XML by category Pin
blindcapt2-Apr-09 18:59
blindcapt2-Apr-09 18:59 
AnswerRe: Group XML by category Pin
Lee Humphries16-Apr-09 0:32
professionalLee Humphries16-Apr-09 0:32 
QuestionXSLT and the xml:base-uri attribute Pin
Lea Hayes31-Mar-09 11:51
Lea Hayes31-Mar-09 11:51 
Questiongenerate a result based on a XML file [modified] Pin
alexyxj31-Mar-09 6:36
alexyxj31-Mar-09 6:36 
AnswerRe: generate a result based on a XML file Pin
alexyxj31-Mar-09 6:37
alexyxj31-Mar-09 6:37 
GeneralRe: generate a result based on a XML file Pin
alexyxj3-Apr-09 11:00
alexyxj3-Apr-09 11:00 
QuestionRelaxNG Attribute Override Pin
Lea Hayes31-Mar-09 2:39
Lea Hayes31-Mar-09 2:39 
QuestionUpdate InfoPath option button using XML Pin
hoonzis26-Mar-09 5:54
hoonzis26-Mar-09 5:54 
QuestionInclude superscript and subscript in a XML. Pin
Vishnu Nath26-Mar-09 3:05
Vishnu Nath26-Mar-09 3:05 
AnswerRe: Include superscript and subscript in a XML. Pin
scottgp26-Mar-09 3:32
professionalscottgp26-Mar-09 3:32 
QuestionHow to include Word Place Holders into my xslt? Pin
Tejabhiram25-Mar-09 3:58
Tejabhiram25-Mar-09 3:58 
AnswerRe: How to include Word Place Holders into my xslt? Pin
led mike25-Mar-09 11:38
led mike25-Mar-09 11:38 
GeneralRe: How to include Word Place Holders into my xslt? Pin
Tejabhiram25-Mar-09 18:58
Tejabhiram25-Mar-09 18:58 
GeneralRe: How to include Word Place Holders into my xslt? Pin
led mike26-Mar-09 4:50
led mike26-Mar-09 4:50 

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.