The XML file is not valid
I was working on a project earlier and I closed HISE once I was finished. Now I have come to reopen the project, I go to load the .hip file, it loads but the project is empty, no modules at all. So instead I tried to load the XML backup I had made, and I get a message saying
The XML is not valid. Loading Aborted. Help please!
Here's a link to the XML file - https://www.dropbox.com/s/k38pq5iybixfmzc/michaelasHarp.xml?dl=0
XML Preset should be the default save format, get rid of .hip
So I solved the issue using this XML validation tool - https://xmlvalidation.com/
What had happened is in a previous version of my script I had created a slider using a panel and it had this property set
allowCallbacks="Clicks, Hover & Dragging". At a later point I replaced the panel with a standard HISE knob control but kept the same control name. In the XML I found this
itemColour="1850056016" ="Clicks, Hover & Dragging"/>for that control. Obviously not valid some redundant property values from the previous panel.
Hopefully this will help someone else too :).
Christoph Hart last edited by
Ah yes running a XMl validator is the thing I would have suggested too
NoTan2 last edited by NoTan2
I don't wish to hijack this thread but it is somewhat related. David's comments prompted me to do some experimentation.
Since I wasn't entirely clear on what the various File\Open and Save options do (I can't find the documentation for them?), I decided to start a new project and document exactly what was created under the Project folder at each point.
I'll include the full description of what I found below but I don't really expect anyone to read it through.
The significant points are:-
After setting up some modules and a little scripting, I selected Edit Script Editor\Save Script To File. This created Interface.js under the Scripts folder.
Then I selected File\Save as XML and this action deleted the Interface.js but the script did not appear to be in the XML Preset backup file.
After this Edit Script Editor\Save Script To File refused to create Interface.js.
So I quit the application and re-opened it and pretended that the .hip was corrupt as for David above.
I selected File\Open recent XML and selected the backup I just created.
The script was missing, the Canvas was blank but the Widget List shows the Slider and Button that I created.
I've also noted some strange behaviour with the <ESC> popup in the Script Editor but that doesn't really pertain to this thread.
Clearly I'm doing something wrong but not sure what it is.
Here is everything I did.
- Created new Project Folder - HISE_2
- Copied .wav and .sfz into Samples folder
- From Master Chain, added Sampler
- Dragged .sfz onto Sampler
- Selected all samples and right-clicked "Tools\Automap using Metadata"
- Added Simple Reverb to Sampler
- Autosave created Presets\Autosave_1.hip. (No scripts in this file yet)
- Switched to Interface Designer view and clicked Frontend Panels button.
- Clicked Ok on "Create User Interface" dialog
- Clicked OK on "Switch to Interface Designer" dialog
- Autosave created Presets\Autosave_2.hip. (Default script is now in this file)
- Added Knob to Canvas and renamed to "knReverbAmount", text to "Reverb Amount"
- Set processorId to Simple Reverb and parameterId to WetLevel.
- Right-clicked on Simple Reverb and selected "Create script variable declaration" and pasted into Script Editor.
- Created button and renamed to btnReverbEnabled and text to "Reverb Enabled"
- Right-clicked on btnReverbEnabled and selected "Create custom callback definition and pasted into Script Editor.
- Autosave created Presets\Autosave_3.hip. Script seems to be up to date in this file.
- In Script Editor, removed comment from the new inline function and <ESC>. NOTE: SimpleReverb was not shown. Typed "Simp" and <ESC>. Only shows ModuleIds.SimpleReverb. Doesn't offer the SimpleReverb var declared above.
- Selected File\Save Archive, clicked OK on "Save Master Chain" dialog. Typed "HISE_2 as unique name. Clicked OK. Saved as Presets\HISE_2.hip.
- Re-opened HISE.
- File\Recent Projects and selected the HISE_2.
- Clicked OK on Switch projects? dialog. This appeared to do nothing.
- Selected File\Open Recent Archive and selected "HISE_2". This loaded project.
- Back to Script Editor and typed "S" and <ESC>. Popup now shows "SimpleReverb".
- Typed "SimpleReverb.setBypassed(value == true ? false : true);"
- Compiled. Tested and works Ok.
- Selected Edit Script Editor\Save Script To File. Created Interface.js under the Scripts folder.
- Selected File\Save as XML and typed "HISE_2". This created XmlPresetBackups\HISE_2.xml but DELETED the script Interface.js.
- Selected Edit Script Editor\Save Script To File. This time it did NOT create Interface.js.
- Re-opened HISE. Pretended that the .hip was corrupt and selected File\Open recent XML and selected HISE_2.xml.
- I got back the Sample with all the samples and the Simple Reverb.
- In Interface Designer view, I have no script, the Canvas is blank but the Widget List shows the Slider and Knob.
- Rebuild Interface does nothing.
- File\Open Recent Archive. This restores the Canvas and the script but not the last line I entered.
- In Script Editor, <ESC> now presents the SimpleReverb var as a String and offers String functions after the fullstop.
@notan2 Which version of HISE are you using?
NoTan2 last edited by NoTan2
@d-healey v 1.6.0 Build 650.
Built from source which I downloaded about 10 days ago, David.
If you think the behaviour is non-typical, I have two other PCs on which I can build it and carry out the same tests in case it's a PC-related issue.
File\Recent Projects and selected the HISE_2.
Clicked OK on Switch projects? dialog. This appeared to do nothing.
When you open HISE it selects the last opened project by default so all you have to do is select the preset (.hip). So it's correct that you didn't see anything happen here.
Selected Edit Script Editor\Save Script To File. Created Interface.js under the Scripts folder.
That might have confused HISE since it automatically saves the interface script in Scripts/ScriptProcessors/Project Name/Interface.js There is no need to save you interface script manually.
NoTan2 last edited by