PDA

View Full Version : XML Help


doela
03-09-2005, 11:23 PM
First i'd like to indroduce my self and say to every one here
i'm by far no where near a coder level or programmer but i'm working with digital media and xml files inputing text to them and my problem follows

i had to make price changes to an alread generated XML file from a company that we are doing the media for, now at the time we had set a price which was included in the XML file now the price has changed... took me a while to figure out how to do it to a mass set of files but the find and replace has done the job

Now things get a bit crazy i have media files in the XML but with out there location in from of the name example <base_filename x.wma</base_filename>

what i want to do is put the location of the file in fron of the x.wma
example

<base_filename>/audiofiles/x.wma</base_filename>

now my problem would have been solved by the find and replace except the audio file changes each time for example the next one would be x2 etc.. so like the price tag that i changed, to a mass set of XML files i hope to do this to a mass set as well as i have over 300,000 xml files to edit

please please any help into this would be great
thanks in advance

Doela

Alex Vincent
03-10-2005, 04:50 AM
Do you have command-line access to these files?

doela
03-14-2005, 04:48 PM
no i just have the xml files them selfs the actual files where all produced off site. :(

codegoboom
03-15-2005, 08:02 AM
Sounds like you need a regular expression. Some text editors support them, but I'm not sure about batch. That can be done using the Windows Script Host or an HTA, the FileSystemObject and/or MSXML, with a supported scripting language... or maybe the application which reads the path can just append it at run time.

Then again, if all occurances of <base_filename> are to be modified, then replacing <base_filename> with <base_filename>/audiofiles/ could do...