The desire is it add POI entries to an XML (database.xml) (about 100, all the same for every entry) before the <\song> is closed off, so the simple way is NP++, edit find "</Song>" and replace with "My_lines/r</Song>"
Which is the quickest solution for a one off. But the end users are more useless than me.
I've followed some stuff and made, database.xsd and database.cs but I've only been blindly following instruction.
This is an example of the xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<VirtualDJ_Database Version="8.0.0">
<Song FilePath="F:\music\Jump Around To Insane Kolomeika (DJ Dodgy-Style Mash-Up).wav" FileSize="35132840" Flag="8192">
<Tags Author="DJ Dodgy-Style " Title="Jump Around To Insane Kolomeika" Flag="2" />
<Infos SongLength="199.142540" FirstSeen="1394322480" FirstPlay="1395607860" LastPlay="1415213613" PlayCount="4" Bitrate="1411" Color="16517356" Cover="32" />
<Comment>mash up insane in t membrain</Comment>
<Scan Version="800" Bpm="0.545828" AltBpm="0.818662" Volume="0.705265" Key="A" />
<Poi Pos="0.743039" Type="automix" Point="fadeStart" />
<Poi Pos="4.992336" Type="beatgrid" />
<Poi Pos="4.996644" Type="automix" Point="cutStart" />
</Song>
<Song FilePath="F:\music\RRR023-A_Hajkan_Bajkan_-_Elephant_Step_Stantekk_rmx.flac" FileSize="26720302">
<Tags Flag="1" />
<Infos SongLength="216.118367" FirstSeen="1401483615" FirstPlay="1409758608" LastPlay="1415208116" PlayCount="2" Bitrate="989" Cover="34" />
<Scan Version="800" Bpm="0.600000" AltBpm="0.600000" Volume="0.896348" Key="C" Flag="1" />
<Poi Pos="2.700590" Type="beatgrid" />
<Poi Type="automix" Point="fadeStart" />
<Poi Pos="214.087982" Type="automix" Point="fadeEnd" />
</Song>
</VirtualDJ_Database>
Any help at all would be great, thanks.generate your model class with xsd.exe, input xml is vdj database.
http://blogs.msdn.com/b/yojoshi/archive ... d-exe.aspx
- deserialize the xml databases into objects. i.e. like this:
- do what ever you want with the db-objectsCode: Select all
foreach (string pathToDatabase in _databaseFilePaths) { XmlReaderSettings xmlReaderSettings = new XmlReaderSettings(); xmlReaderSettings.CheckCharacters = false; XmlSerializer ser = new XmlSerializer(typeof(VirtualDJ_Database)); VirtualDJ_Database database; using (XmlReader reader = XmlReader.Create(pathToDatabase, xmlReaderSettings)) { database = (VirtualDJ_Database)ser.Deserialize(reader); databaseCollection.Add(pathToDatabase, database); } }
- serialize the objects back into xml
- done : )