Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best approach for an xml find and replace.
Message
De
16/12/2005 16:09:15
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
01078546
Message ID:
01078805
Vues:
13
>I am coding in C# and need to do some find and replace in an xml file where I will be replacing a file path to a qualified file name with a different path.
>I’m not sure if the best way to do this is with xslt, regular expressions or something else altogether.
>
>The document is a word ml file and I would be swapping the file path on linked images.
>Everything else in the document should remain untouched. I am just changing the value of the src attribute when the type is imagedata.
>
><v:imagedata src="C:\Documents and Settings\user\My Documents\My Pictures\Untitled1.jpg"/>
>
>Any thoughts on this?

Xslt is a little cleaner than regex for this type of operation. Plus Xslt can be kept up to date with changes in the Word schema by editing the xslt file instead of the code.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform