Jump to content

error - xml


Meshare

Recommended Posts

Posted
local xmlFile = xmlLoadFile ( "exampleFile.xml" ) 
if xmlFile then 
    local node = xmlFindChild( xmlFile, "Name", 0 ) 
    local success = xmlNodeGetValue ( node ) 
    if success then 
        for i,nodee in ipairs(success) do 
            guiGridListSetItemText(List,row,1,tostring(nodee),false,true) 
        end 
    end 
end 

bad argument #1 to 'ipairs' (table expected, got string)

يجي بالستهxmlالمقصود من الكود كل الي في

Posted

شوف ذا المثال منه تفهم

local file = xmlLoadFile("file.xml") 
local ch = xmlFindChild(file,"Name",0) 
for i,name in ipairs(xmlNodeGetAttributes(ch)) do 
    local row = guiGridListAddRow(List) 
    guiGridListSetItemText(List,row,1,name,false,false) 
end 
  

او شوف الامثله الي في ذي الوظيفه

xmlNodeGetAttributes

Posted

ماحد يعرف يحل المشكله؟

xml مانفع كودك ياطلال وحاولة في المثال الي بالويكي من قبل مانفع ارجو الحل من اصحاب الخبره في

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...