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 :).


  • administrators

    Ah yes running a XMl validator is the thing I would have suggested too 😉



  • 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.

    1. Created new Project Folder - HISE_2
    2. Copied .wav and .sfz into Samples folder
    3. From Master Chain, added Sampler
    4. Dragged .sfz onto Sampler
    5. Selected all samples and right-clicked "Tools\Automap using Metadata"
    6. Added Simple Reverb to Sampler
    7. Autosave created Presets\Autosave_1.hip. (No scripts in this file yet)
    8. Switched to Interface Designer view and clicked Frontend Panels button.
    9. Clicked Ok on "Create User Interface" dialog
    10. Clicked OK on "Switch to Interface Designer" dialog
    11. Autosave created Presets\Autosave_2.hip. (Default script is now in this file)
    12. Added Knob to Canvas and renamed to "knReverbAmount", text to "Reverb Amount"
    13. Set processorId to Simple Reverb and parameterId to WetLevel.
    14. Right-clicked on Simple Reverb and selected "Create script variable declaration" and pasted into Script Editor.
    15. Created button and renamed to btnReverbEnabled and text to "Reverb Enabled"
    16. Right-clicked on btnReverbEnabled and selected "Create custom callback definition and pasted into Script Editor.
    17. Autosave created Presets\Autosave_3.hip. Script seems to be up to date in this file.
    18. 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.
    19. 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.
    20. File\Quit.
    21. Re-opened HISE.
    22. File\Recent Projects and selected the HISE_2.
    23. Clicked OK on Switch projects? dialog. This appeared to do nothing.
    24. Selected File\Open Recent Archive and selected "HISE_2". This loaded project.
    25. Back to Script Editor and typed "S" and <ESC>. Popup now shows "SimpleReverb".
    26. Typed "SimpleReverb.setBypassed(value == true ? false : true);"
    27. Compiled. Tested and works Ok.
    28. Selected Edit Script Editor\Save Script To File. Created Interface.js under the Scripts folder.
    29. Selected File\Save as XML and typed "HISE_2". This created XmlPresetBackups\HISE_2.xml but DELETED the script Interface.js.
    30. Selected Edit Script Editor\Save Script To File. This time it did NOT create Interface.js.
    31. File\Quit.
    32. Re-opened HISE. Pretended that the .hip was corrupt and selected File\Open recent XML and selected HISE_2.xml.
    33. I got back the Sample with all the samples and the Simple Reverb.
    34. In Interface Designer view, I have no script, the Canvas is blank but the Widget List shows the Slider and Knob.
    35. Rebuild Interface does nothing.
    36. File\Open Recent Archive. This restores the Canvas and the script but not the last line I entered.
    37. 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?



  • @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.



  • @notan2

    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.



  • @d-healey Thanks.


Log in to reply
 

0
Online

325
Users

969
Topics

6.4k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.