LoginsAndPasswords.xml looks like this:
<?xml version="1.0" encoding="Windows-1250"?>
<AllUsers>
<User>
<id>2</id>
<login>a</login>
<password>a</password>
</User>
<User>
<id>5</id>
<login>b</login>
<password>b</password>
</User>
<User>
<id>7</id>
<login>c</login>
<password>c</password>
</User>
</AllUsers>
At first I insert some login name into loginBox. Then before i add new user I want to check if that login already exists in my xml file. For example I would like to check if login named loginBox->Text=b already exists in xml file. If yes I want to show MessageBox("Given login already exists choose another"). If no I want to create new User in my xml file with given unique login(loginBox->Text), given password(passwordBox->Text) and id greater than max id value of all users.
Aucun commentaire:
Enregistrer un commentaire