Bonjour.
est-ce que quelqu'un sait comment on peut récuperer une valeur d'une propriété xml.
exemple j'aimerai recuperer la valeur opaquelocktoken:6858C896-AA7F-4A4E-99FA-39AC25A1E7F9:214748364853 qui se trouve dans la balise locktoken.
Voila mon code c# mais ca marche pas sniff
StringReader srLecture = new StringReader(MonXML);
XmlTextReader xtrLecture = new XmlTextReader(srLecture);
xtrLecture.ReadElementString("locktoken" )
Voila mon xml
<?xml version="1.0" ?>
- <a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:c="xml:" xmlns:a="DAV:">
- <a:response>
<a:href>http://localhost/WebDAV/hello.txt</a:href>
- <a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
- <a:prop>
<a:getcontentlength b:dt="int">0</a:getcontentlength>
<a:creationdate b:dt="dateTime.tz">2004-05-03T13:42:34.380Z</a:creationdate>
<a:displayname>hello.txt</a:displayname>
<a:getetag>"ecfe417d1431c41:5e4d"</a:getetag>
<a:getlastmodified b:dt="dateTime.rfc1123">Mon, 03 May 2004 13:42:34 GMT</a:getlastmodified>
<a:resourcetype />
- <a:lockdiscovery>
- <a:activelock>
- <a:locktype>
<a:write />
</a:locktype>
- <a:lockscope>
<a:exclusive />
</a:lockscope>
- <D:owner xmlns:D="DAV:">
<D:href>http://localhost/WebDAV/hello.txt</D:href>
</D:owner>
- <a:locktoken>
<a:href>opaquelocktoken:6858C896-AA7F-4A4E-99FA-39AC25A1E7F9:214748364853</a:href>
</a:locktoken>
<a:depth>0</a:depth>
<a:timeout>Second-180</a:timeout>
</a:activelock>
</a:lockdiscovery>
- <a:supportedlock>
- <a:lockentry>
<a:write />
<a:shared />
</a:lockentry>
- <a:lockentry>
<a:write />
<a:exclusive />
</a:lockentry>
</a:supportedlock>
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:iscollection b:dt="boolean">0</a:iscollection>
<a:getcontenttype />
</a:prop>
</a:propstat>
</a:response>
</a:multistatus>
merci d'avance