1

The full story is that I'm exporting a table within ms-access 2007 as an xml file (schema and data). The problem I'm having is with the following element:

<dataroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" generated="2011-05-03T12:15:15">

The generated=... bit changes every time regardless. Is it possible to get SVN to ignore this attribute of the element. Or is there a better way altogether?

Because of this timestamp every time I export the table as an xml file SVN detects a change even if the structure or data of the table hasn't changed.

David
  • 2,101
  • 2
  • 32
  • 41
  • Which Access version do you use? I tried to reproduce that behaviour with MS-Access 2002 (XP) and did not get any "generated" attribute. – Doc Brown May 03 '11 at 11:57
  • I guess there is a way to tell SVN to ignore a particular file. I am not sure if you can configure it to the extent of a part of a file. – gsk May 03 '11 at 12:05
  • @DocBrown I'm currently using access 2007 – David May 03 '11 at 12:09

1 Answers1

0

You could write yourself a short (VBA) program which does the XML export programmatically (look here http://msdn.microsoft.com/en-us/library/aa221224%28v=office.11%29.aspx) and removes the generated attribute afterwards, using the MS Xml Parser (for example, look here: How to parse XML using vba).

But if your MS-Access DB is part of you SVN repository, and you have a program which automatically exports a table as XML from there, then perhaps you can avoid putting those XML file into the repository at all. Just run that program whenever you need an actual version of your XML file.

Community
  • 1
  • 1
Doc Brown
  • 19,739
  • 7
  • 52
  • 88
  • I think I will have to remove the attribute from the generated xml file as you suggested. Regarding the SVN repository, the whole point of exporting the tables as xml is to get the access database under SVN control in the first place! I could just put the whole .mdb binary in the repository but I want finer control that that. – David May 03 '11 at 12:30