getting current scene/objects xml to save on disk

  • Hello,

    I'm trying to create hotspot editor using krpano.

    I want to save every new update on scene after adding.removing etc. hotspot to .xml file using server side script.
    Is there a way to get xml as string or object for the current scene or for new objects or even whole project ?

    If I'm going wrong way, how do you manage saving all updates on panos in .xml ?

    thanks!

    Marek

    Edited once, last by Marek_ (April 7, 2017 at 6:32 PM).

  • Hi,

    here a quote from the xml documentation here:
    https://krpano.com/docu/xml/#xmlstructure

    Quote

    The xml itself is just a transport-format - that means it will be only used to transport the data for the krpano viewer.
    When the xml will parsed, then the xml elements will be transformed/mapped into the krpano internal data structures.
    That means after parsing there is internally no xml anymore.


    That means at runtime there is no xml anymore. If you want to edit the xml, then you would need to load and the edit the xml file itself. The krpano viewer itself will not output a xml file.

    Best regards,
    Klaus

  • I'm currently working on moving hotspots after mousedown. I'm using code from the dragabl-hotspots example.

    Once HS is moved I'd like to save new position in xml config file from "action" script level. Is it possible ?

    I'm adding new line like this:

    Code
    "set(hotspot[get(name)].atv, atv);"



    but that doesn't change xml content and after reload HS is in old place.

    If it's not posisble, what is the best way to save latest changes in xml ? From JS external calls level i'm using jquery call to php and then storing on server.
    Is it doable in similar way in here ? How I could call php from there ?

    thanks

    Edited 7 times, last by Marek_ (May 12, 2017 at 8:37 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!