Code is not parsing the xml corrected

UsernameValue</username><password>Password</pa

seems like I am unable to parse it correctly it start correctly but not doing end correctly , and taking the whole length of xml instead of trimming it to value .
it should return only UsernameValue to me

any idea ?

Please provide enough information while posting a question.

It would be a waste of everyone’s time otherwise.

It is solved , Thanks