How do iDevices handle code which is not valid for iDevices?

  • Hello,

    I'm too blind to see, how iDevices handle XML-code which they cannot handle... Sometimes it seems to me, that they simply ignore the code, sometimes the xml is stuck ("xml parsing failed"). My most recent example ist the lensflare tag. Using it in the code will make the e.g. iPodTouch go stuck, adding the "device" tag won't help (its only meant for the plugin tag), giving me the error message "unknown attribute/path - lensflare[lf0].devices".

    My question is: Do the iDevices ignore XML code, which they don't understand or do they interpret the code as wrong?

    In the first case I have to search for wrong code in my XML, in the latter I will have to use a switch. As far as I understand, Klaus wanted to make the behavior thus, that you only need one XML (assisted by e.g. the new device-tag) - which is a good idea in my eyes.

    Michael

    2 Mal editiert, zuletzt von mstoss (6. Januar 2011 um 14:32)

  • Hi,

    the xml will be always mapped to internal the krpano data structures when loaded,
    this works the same in the krpano Flash viewer and the krpano Javascript viewer,

    but e.g. in the krpanoJS viewer there is currently no internal data structure/type for a "lensflare" predefined,
    in this case a 'custom' object/variable with that name will be created but nothing will happen,
    then finally means not supported elements are basically ignored,

    but when you get "xml parsing failed" - then an other error happen: the XML parser of the Flashplayer is very tolerant to XML syntax errors, it accepts means xml files where the XML parser of the browser reports an error,

    you can check a XML file simply by opening the XML direct in the browser,
    when there is a XML syntax error the browser will show that and it will show where the error is located,

    best regards,
    Klaus

  • well, that's fine enough for me. That means, I can use the same code for desktop and iDevices. Now I only have to figure out, where my XML code is wrong. aehm...

    So, testing the code with the lensflare example gives me this result:

    Code
    <lensflareset name="default" url="%SWFPATH%/icons/krpano_default_flares.jpg">
    		<flare name="n0" pixsize="128" pixupos="  0" pixvpos="  0" pixvpos="  0" color="0xffffef" pos="0.000" scale="0.100" />
    		<flare name="n1" pixsize=" 64" pixupos="128" pixvpos="128" pixvpos="128" color="0x060606" pos="-0.100" scale="0.110" 
    ...
    />

    Browser-checking the XML as you said pointed me to the wrong code: the "pixvpos=" parameter is double in every single line.

    So, a big thank you for making this clearer to me, Klaus.

    All the best,
    Michael

Jetzt mitmachen!

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