FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


XML problems combined with php midi class





Dougie1
I am trying to convert this XML which I made to a midi file. I don't see what is wrong with it but when I try to convert it with the php midi class I get this error:

XML error: mismatched tag at line 66

Here is the XML. What do you think is wrong?

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
   <!DOCTYPE MIDIFile PUBLIC
      "-//Recordare//DTD MusicXML 2.0 MIDI//EN"
      "http://www.musicxml.org/dtds/midixml.dtd">
      <MIDIFile>
<Format>1</Format>
<TrackCount>2</TrackCount>
<TicksPerBeat>842</TicksPerBeat>
<TimestampType>Absolute</TimestampType>
<Track Number="0">
  <Event>
    <Absolute>0</Absolute>

    <TimeSignature Numerator="4" LogDenominator="4" MIDIClocksPerMetronomeClick="56" ThirtySecondsPer24Clocks="8"/>
  </Event>
  <Event>
      <Absolute>0</Absolute>
    <SetTempo Value="5199"/>
  </Event>  <Event>
    <Absolute>0</Absolute>

    <EndOfTrack/><Track Number="1">
  <Event>
    <Absolute>0</Absolute>
    <ProgramChange Channel="1" Number="73"/>
  </Event>
  <Event>
    <Absolute>0</Absolute>
    <NoteOn Channel="1" Note="75" Velocity="82"/>

   </Event><Event>
    <Absolute>114</Absolute>
    <NoteOn Channel="1" Note="50" Velocity="95"/>
   </Event><Event>
    <Absolute>256</Absolute>
    <NoteOn Channel="1" Note="21" Velocity="97"/>
   </Event><Event>
    <Absolute>321</Absolute>

    <NoteOn Channel="1" Note="96" Velocity="89"/>
   </Event><Event>
    <Absolute>454</Absolute>
    <NoteOn Channel="1" Note="61" Velocity="87"/>
   </Event><Event>
    <Absolute>530</Absolute>
    <NoteOn Channel="1" Note="89" Velocity="80"/>
   </Event><Event>

    <Absolute>663</Absolute>
    <NoteOn Channel="1" Note="28" Velocity="83"/>
   </Event><Event>
    <Absolute>745</Absolute>
    <NoteOn Channel="1" Note="42" Velocity="99"/>
   </Event><Event>
    <Absolute>820</Absolute>

    <NoteOn Channel="1" Note="34" Velocity="97"/>
   </Event><Event>
    <Absolute>965</Absolute>
    <NoteOn Channel="1" Note="59" Velocity="96"/>
   </Event><Event>
    <Absolute>1009</Absolute>
    <NoteOn Channel="1" Note="68" Velocity="90"/>
   </Event><Event>

    <Absolute>1122</Absolute>
    <NoteOn Channel="1" Note="82" Velocity="80"/>
   </Event><Event>
    <Absolute>1200</Absolute>
    <EndOfTrack/>
  </Event>
</Track>
</MIDIFile>
Stubru Freak
Dougie1 wrote:
I am trying to convert this XML which I made to a midi file. I don't see what is wrong with it but when I try to convert it with the php midi class I get this error:

XML error: mismatched tag at line 66

Here is the XML. What do you think is wrong?


I can't find a problem. Are you sure that XML is produced?
kk_loke86
When I try to view your code, it happens to has such error. I think you need to modify your DTD definition on the line 2.


An XML element is not allowed inside a DTD. Error processing resource 'http://www.musicxml.org/dtds/MIDIEvents10.dtd'. Lin...


Hope it solve your problem..
Stubru Freak
At line 23, I think you need to close your Event tag before opening a new one.
Dougie1
Stubru Freak wrote:
At line 23, I think you need to close your Event tag before opening a new one.
Thanks! Very Happy
Related topics
PHP Validation Class
Implementing your database access in PHP as a layer.
php include path
Problems With Php Memory Size
PHP VS ASP
Problems with PHP-Nuke on Server2
Problems with php
PHP Image Questions
form mail problems (quality help=frih$)
PHP mailing script
Layout Gap PRoblems with PHP/Javascript Combo
php super slow!!
Creating XML files using PHP
PHP logging class
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.