Lecture fichier xml erroné
Bonjour à tous,
Je récupère un fichier XML provenant de IceCat (fournisseur d'infos détaillées sur divers articles) mais voilà parfois dans leur fichier il y a des erreurs comme :
Citation:
<file path="export/freexml.int/FR/12630252.xml" Product_ID="12630252" Updated="20121129153005" Quality="ICECAT" Supplier_id="161" Prod_ID="18G240700310" Catid="1284" On_Market="1" Model_Name="LCD TFT 7"" Product_View="298" HighPic="http://images.icecat.biz/img/norm/high/12630252-4="NL" />
</Country_Markets>
</file>
HighPic="http://images.icecat.biz/img/norm/high/12630252-4="NL" <--- ce NL me provoque une erreur dans ma conversion suivante
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Dim SchemaPath As String = Dts.Variables("User::RepIntegration").Value + Dts.Variables("User::LOC_RepertoireXslt").Value + Dts.Variables("User::XsltName").Value
Dim xslt As New XslCompiledTransform()
xslt.Load(SchemaPath)
Dim settings As New Xml.XmlReaderSettings()
settings.ProhibitDtd = False
Dim SourcePath As String = Dts.Variables("User::RepIntegration").Value + Dts.Variables("User::LOC_RepertoireTelechargement").Value + Dts.Variables("User::FileNameFinal").Value
Dim source As Xml.XmlReader = Xml.XmlReader.Create(SourcePath, settings)
Dim DestinationPath As String = Dts.Variables("User::RepIntegration").Value + Dts.Variables("User::LOC_RepertoireTemporaire").Value + Dts.Variables("User::XmlNameFinal").Value
Dim Destination As Xml.XmlWriter = Xml.XmlWriter.Create(DestinationPath)
xslt.Transform(source, Destination) |
Peut-on dire d'ignorer ou de passer les lignes foireuses?