Starr Duskk
asked on
How do I read this XML Error: There is an error in XML document (8, 2).
I have an xml error during deserializing
Fail: There is an error in XML document (8, 2).
what does 8,2 mean? where is that?
<?xml version="1.0" encoding="UTF-8"?>
<XXXTraineeResult>
<Processed>
<Environment>TEST</Environ ment>
<Trainees>
<Trainee>
<TrainingSessionNumber>0</ TrainingSe ssionNumbe r>
<SessionDateTime>2014-10-1 5T18:02:27 .000</Sess ionDateTim e>
<ExamResult>P</ExamResult>
<SocialSecurityLastFour>55 55</Social SecurityLa stFour>
<DateOfBirth>1997-11-03</D ateOfBirth >
<Name>
<First>test</First>
<MiddleInitial>K</MiddleIn itial>
<Last>test</Last>
</Name>
</Trainee>
</Trainees>
</Processed>
</XXXTraineeResult>
thanks!
Fail: There is an error in XML document (8, 2).
what does 8,2 mean? where is that?
<?xml version="1.0" encoding="UTF-8"?>
<XXXTraineeResult>
<Processed>
<Environment>TEST</Environ
<Trainees>
<Trainee>
<TrainingSessionNumber>0</
<SessionDateTime>2014-10-1
<ExamResult>P</ExamResult>
<SocialSecurityLastFour>55
<DateOfBirth>1997-11-03</D
<Name>
<First>test</First>
<MiddleInitial>K</MiddleIn
<Last>test</Last>
</Name>
</Trainee>
</Trainees>
</Processed>
</XXXTraineeResult>
thanks!
ASKER
attached is the vb from the schema.
Here is my deserialization method:
Here is my deserialization method:
Public Function GetOrderQueryReply(ByVal result As String) As RampTraineeResult.RAMPTraineeResult
Dim oqr As RampTraineeResult.RAMPTraineeResult = New RampTraineeResult.RAMPTraineeResult()
Dim serializer As New XmlSerializer(GetType(RampTraineeResult.RAMPTraineeResult))
Dim reader As New StringReader(result)
oqr = DirectCast(serializer.Deserialize(reader), RampTraineeResult.RAMPTraineeResult)
Return oqr
End Function
RampTraineeResult.vb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(8, 2) means line 8, character 2.
The Exception should have an InnerException with the exact cause of the error.
The Exception should have an InnerException with the exact cause of the error.
ASKER
Perfect!! Why do I always forget I can look there!!!?? thanks!
in case this is useful:
XmlSerializer.Deserialize Method (XmlReader)
http://msdn.microsoft.com/en-us/library/tz8csy73(v=vs.110).aspx