How read value from XmlNode
- by klerik123456
I have a Xml file and I try to read value from node Ticket, but my output is still empty. Can somebody help me ?
Xml docmunet :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<TicketHeader xmlns="http://tempuri.org/">
<Ticket>
heslo
</Ticket>
</TicketHeader>
</soap:Header>
<soap:Body>
<test xmlns="http://tempuri.org/"/>
</soap:Body>
</soap:Envelope>
My code :
doc= new XmlDocument();
doc.Load(path);
XmlNode temp = doc.SelectSingleNode("//Ticket");
textBox3.Text=temp.InnerXml;