Custom XML tags in krpano

  • Hello Klaus,

    I'm developing an extension for krpano that relies on a set of configuration data. For better readability and maintainability, I'd like to describe this data using hierarchical XML, for example:

    XML
    <custompreset name="example">
       <item style="style1" param1="0.0" param2="1.0" param3="1.0" />
       <item style="style2" param1="0.5" param2="0.8" param3="0.8" param4="45" />
    </custompreset>

    During initialization, I plan to parse these tags via JavaScript (using krpano.get("xml.content") and DOMParser) and create standard krpano objects from them.

    However, when testing in a full tour (with multiple <include>s), I found that unknown tags like <custompreset> do not appear in the xml.content string – krpano seems to filter them out while building the internal DOM.

    Questions:

    1. Is there an official (or undocumented) way to register custom XML tags so that they are preserved in xml.content and accessible for parsing?
    2. If not, what approach would you recommend for storing hierarchical configurations without resorting to "flat" structures like multiple <data> elements sharing a common attribute?
    3. Are there any plans to provide an API for extending the XML schema with plugins in future versions?

    I would appreciate any clarification or pointers to best practices.

    translation difficulties *huh*

Participate now!

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