• Hi all!

    Thank you very much in advance for helping!

    How can I get 'title' and 'content' values?

    Code
    <mydata name"level_1"> 
    <data name="title"><h1>This is the title</h1></data>
    <data name="content"><p>This is the content<p></data>
    </mydata>


    I tried everything but I cannot get the values!
    Is the structure ok? I have tried other combinations...

    Code
    <data name"level_1">
    <data name="title"><h1>This is the title</h1></data>
    <data name="content"><p>This is the content<p></data>
    </data>


    but still I'm hitting against a wall!

    Cheers!

  • Hi,

    krpano doesn't manage <data> elements inside other elements - that means to access the whole raw data content, the <data> element need to defined at the <krpano> level,

    e.g. xml:

    Code
    <krpano>
      ...
      <data name="test">
    	...any content...
      </data>
      ...
    </krpano>

    access by:

    Code
    get(data[test].content)

    Best regards,
    Klaus

  • Oh, I see,

    I was hoping to be able the following:

    I have a rather complicated action which display some text getting the values form <data> elements.
    The thing is that I call this action twice, and the only thing that change is the content, so I could do:

    Code
    <data name="extremely_long_and_complicated_slide_name_and_extreme_long_and_complicated_title_1>This is title One</data>
     <data name="extremely_long_and_complicated_slide_name_and_extreme_long_and_complicated_title_2_title>This is the title Two</data>


    But I have lots of scenes, so I'd prefer have something like

    Code
    <extremely_long_and_complicated_slide_name_1>
        <data name="extreme_long_and_complicated_title">This is title One</data>
    </extremely_long_and_complicated_slide_name_1>
    
    
    <extremely_long_and_complicated_slide_name_2>
        <data name="extreme_long_and_complicated_title">This is title Two</data>
    </extremely_long_and_complicated_slide_name_2>



    But is not possible...

    Thank you for your quick reply!



    Cheers

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!