I have done this before and worked just fine BUT ... now its not working and I don't understand why ... (I'm using LC 6.5.1)
I have the following XML tree:
Code: Select all
put revCreateXMLTree("<configs></configs>", false, true, false) into treeConfigs
-- Table Skin --
revAddXMLNode treeConfigs, "/configs", "tableskins", ""
-- Table Skin -> Type = Image
revAddXMLNode treeConfigs, "/configs/tableskins", "skintype[1]", ""
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]", "idx", "1"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]", "name", "Image"
revAddXMLNode treeConfigs, "/configs/tableskins/skintype[1]", "typeoption[1]", "imageXXX.png"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]/typeoption[1]", "idx", "1"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]/typeoption[1]", "name", "Bg1"
revAddXMLNode treeConfigs, "/configs/tableskins/skintype[1]", "typeoption[2]", "imageXXX.png"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]/typeoption[2]", "idx", "2"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]/typeoption[2]", "name", "Bg2"
revAddXMLNode treeConfigs, "/configs/tableskins/skintype[1]", "typeoption[3]", "imageXXX.png"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]/typeoption[3]", "idx", "3"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[1]/typeoption[3]", "name", "Bg3"
-- Table Skin -> Type = Color
revAddXMLNode treeConfigs, "/configs/tableskins", "skintype[2]", ""
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]", "idx", "2"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]", "name", "Color"
revAddXMLNode treeConfigs, "/configs/tableskins/skintype[2]", "typeoption[1]", "0,138,0"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]/typeoption[1]", "idx", "1"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]/typeoption[1]", "name", "Green"
revAddXMLNode treeConfigs, "/configs/tableskins/skintype[2]", "typeoption[2]", "27,161,226"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]/typeoption[2]", "idx", "2"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]/typeoption[2]", "name", "Blue"
revAddXMLNode treeConfigs, "/configs/tableskins/skintype[2]", "typeoption[3]", "162,0,37"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]/typeoption[3]", "idx", "3"
revSetXMLAttribute treeConfigs, "/configs/tableskins/skintype[2]/typeoption[3]", "name", "Red"
If I try to execute the following code, nothing happens....
Code: Select all
-- TESTING --
put revXMLRootNode(treeConfigs) into rootNode
put revXMLMatchingNode(treeConfigs, rootNode, "skintype", "idx", "1", -1) into subNode
answer "root = " & rootNode -- this answers "configs" which is correct
answer "tree = " & revXMLText(treeConfigs) -- this returns nothing, don't understand why
answer "subnode = " & subNode -- this nothing returns, either
Many thanks in advance
- Miguel