Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading XML
Message
De
23/08/2005 14:44:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Reading XML
Divers
Thread ID:
01043031
Message ID:
01043031
Vues:
52
I have been reading through various article's and trying different things
and just seem to be getting more confused.... What I want to do is get the status node and then just loop through it to build a messagebox to display the error recieved. It is probably a problem with the xpath parameter of the SelectNodes methos but I cant seem to find anything that points me in the right direction.

THanks
Paul
---VB Code---
 ' Hard code path to test document 
        ' Reminder change hard code
        Dim StrXml As String = "c:\response.xml"
        'Create Xml Dom Instance
        Dim ODoc As XmlDocument = New XmlDocument
        Dim ONodeList As XmlNodeList
        ODoc.Load(StrXml)
        ' Problem seems to be below
        ONodeList = ODoc.SelectNodes("/Message/Response/Status")
        MsgBox(ONodeList.Count) ' =0 So ONodelist is not getting populated? 
---XML---
<Message xmlns="http://www.connectpas.com/webservice/0-20041220" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" parseonly="false" ConfigId="004287">
	<CallHeader>
		<CallId>{05199945-4C3A-4F5E-B0D8-B9BE49BFDBA3}</CallId>
		<SentDateTime>2005-08-18T16:29:29</SentDateTime>
		<ServerName>GAINESVILLE</ServerName>
		<From>
			<Company>
				<CompanyId>031989</CompanyId>
				<CompanyPassword>{0D17}</CompanyPassword>
			</Company>
			<User>
				<UserId>TestUser</UserId>
				<UserPassword>ActiV8</UserPassword>
			</User>
		</From>
	</CallHeader>
	<Response xsi:type="Response_Type">
		<ResponseHeader>
			<ResponseServerName>PCWS_SERVER</ResponseServerName>
			<ResponseTime>2005-08-18T15:28:27</ResponseTime>
		</ResponseHeader>
		<Status>
			<Severity>InputContentError</Severity>
			<Level>LogRequest</Level>
			<Code>51053</Code>
			<Description>Invalid CardNumber. CardNumber has an invalid length.</Description>
			<Action>Please correct and resubmit.</Action>
		</Status>
	</Response>
</Message>
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform