Réponse acceptée !
Bonsoir,
Ce que tu peux faire, c'est écrire du html propre (en fermant tes balises, en mettant bien tes " sur les attributs). Le mieux étant même d'écrire du xhtml plutôt que du html. Ta chaîne de caractère pourra alors être charchée dans un document xml que tu vas pour voir manipuler sans problème.
Ta chaîne doit devenir la suivante : <table cellspacing="0" cellpadding="0" width="100%" align="left" border="1"><tbody><tr><td><img alt="" hspace="0" src="c:\documents and settings\monpc\mes documents\mes images\monimage.jpg" align="baseline" border="0"/></td><td></td></tr><tr><td></td><td></td></tr></tbody></table>
Et tu peux alors utiliser le code suivant :
Dim
vChaine
As
String
Dim
vXmlDoc
As
New
System.Xml.XmlDocument()vChaine =
"<table cellspacing=""0"" cellpadding=""0"" width=""100%"" align=""left"" border=""1""><tbody><tr><td><img alt="""" hspace=""0"" src=""c:\documents and settings\monpc\mes documents\mes images\monimage.jpg"" align=""baseline"" border=""0""/></td><td></td></tr><tr><td></td><td></td></tr></tbody></table>"
Try
vXmlDoc.LoadXml(vChaine)
Try
Response.Write(vXmlDoc.SelectSingleNode(
"/table/tbody/tr/td/img"
).Attributes(
"src"
).Value)
Catch
ex
As
Exception
Response.Write(
"Je ne le trouve pas le noeud l."
)
End
Try
Catch
ex
As
Exception
Response.Write(
"J'ai dis du html propre !!!"
)
End
Try
TiK - MCSD.NET
[ Lien ]
[ Lien ]