More XML Confusion?

Dave dave at looktowindward.com
Tue May 29 08:04:50 EDT 2007


Hi All,

I've been playing around and got to the point where I can add nodes  
etc. However I need to generate lots of "Failure" nodes. When I run  
the following code, only the second node gets added. How can I add  
multiple nodes?

  --
   --  Add Failure Node
   --
   put myRootNode & "/results/failsequence/failure" into myCurrentNode
   get UtilXMLNewElement(myXMLDocumentID,myRootNode & "/results/ 
failsequence","failure",empty)
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"timecode","00:01:29:02")
   get UtilXMLNewAttribute(myXMLDocumentID,myCurrentNode,"flash","0.5")
   get UtilXMLNewAttribute(myXMLDocumentID,myCurrentNode,"red","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"spatial","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"extended","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"reddiag","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"flashdiag","7")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"spatialraw","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"flashraw","0.0")
   get UtilXMLNewAttribute(myXMLDocumentID,myCurrentNode,"redraw","0.0")

   -------

   get UtilXMLNewElement(myXMLDocumentID,myRootNode & "/results/ 
failsequence","failure",empty)
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"timecode","00:01:29:03")
   get UtilXMLNewAttribute(myXMLDocumentID,myCurrentNode,"flash","0.5")

.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"spatial","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"extended","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"reddiag","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"flashdiag","7")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"spatialraw","0.0")
   get UtilXMLNewAttribute 
(myXMLDocumentID,myCurrentNode,"flashraw","0.0")
   get UtilXMLNewAttribute(myXMLDocumentID,myCurrentNode,"redraw","0.0")

This is what I was expecting:
    <results analyser="fpaanalyser">
       <failsequence startframe="00:01:29:02">
         <failure timecode="00:01:29:02" flash="0.5" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="7" spatialraw="0"  
flashraw="0" redraw="0" />
         <failure timecode="00:01:29:03" flash="0.5" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="7" spatialraw="0"  
flashraw="0" redraw="0" />
       </failsequence>

Thanks a lot
All the Best
Dave

Hi All,

I am confused as to how to the use revXMLxxx Command to add the XML  
data copied below.


How do I use revAddXMLNode and revSetXMLAttribute (or any other  
RevXMLxxx commands) to add the data to an XML tree?

Thanks a lot
All the Best
Dave

<?xml version="1.0"?>
<fpasvc>
     <header>
         <fpasvc version="2105" />
         <file name="TestSequence2.avi" />
         <video framerate="25.00" width="720" height="576" />
         <analysis totalframes="00:02:14:15" />
         <analysis endframe="00:02:14:15" />
     </header>

     <summary analyser="fpaanalyser" version="1310"  
analysis_standard="OfCOM(ITC)" mode="PAL" scan="Interlaced"  
status="Failed" error="">
         <item type="luminanceflash_failures" count="178" />
         <item type="luminanceflash_warnings" count="488" />
         <item type="redflash_failures" count="0" />
         <item type="redflash_warnings" count="66" />
         <item type="spatialpattern_failures" count="0" />
         <item type="spatialpattern_warnings" count="103" />
         <item type="extended_failures" count="46" />
     </summary>

     <results analyser="fpaanalyser">
       <failsequence startframe="00:01:29:02">
         <failure timecode="00:01:29:02" flash="0.5" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="7" spatialraw="0"  
flashraw="0" redraw="0" />
         <failure timecode="00:01:29:03" flash="0.5" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="7" spatialraw="0"  
flashraw="0" redraw="0" />
       </failsequence>

       fail<failsequence startframe="00:01:29:10">
         <failure timecode="00:01:29:10" flash="0.6" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="7" spatialraw="0"  
flashraw="0" redraw="0" />
         <failure timecode="00:01:29:11" flash="0.8" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="8" spatialraw="0"  
flashraw="0" redraw="0" />
         <failure timecode="00:01:29:12" flash="0.8" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="8" spatialraw="0"  
flashraw="0" redraw="0" />
         <failure timecode="00:01:29:13" flash="0.6" red="0.0"  
spatial="0.0" extended="0" reddiag="0" flashdiag="7" spatialraw="0"  
flashraw="0" redraw="0" />
       </failsequence>

    </results>
</fpasvc>

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list