doneparsing
語(yǔ)法:result:=callobject(object,"doneparsing")
說(shuō)明:如果xml字符串解析完畢則返回true。
getattributename
語(yǔ)法:result:=callobject(object,"getattributename",ichild,"xmlnode")
說(shuō)明:返回指定節(jié)點(diǎn)的某一屬性名。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定,屬性號(hào)由參數(shù)ichild指定。
getattributevaluebyindex
語(yǔ)法:result:=callobject(object,"getattributevaluebyindex",ivalue,"xmlnode")
說(shuō)明:根據(jù)屬性號(hào),返回指定節(jié)點(diǎn)的某一屬性的值。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定,屬性號(hào)由參數(shù)ivalue指定。
getattributevaluebyname
語(yǔ)法:result:=callobject(object,"getattributevaluebyname","attributename","xmlnode")
說(shuō)明:根據(jù)屬性名稱,返回指定節(jié)點(diǎn)的某一屬性的值。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定,屬性名稱由參數(shù)attributename指定。
getchild
語(yǔ)法:result:=callobject(object,"getchild",ichild,"xmlnode")
說(shuō)明:返回指定xml節(jié)點(diǎn)的子節(jié)點(diǎn)。例如,第1個(gè)結(jié)點(diǎn)的第5個(gè)子節(jié)點(diǎn)表示為“1,5”。xml節(jié)點(diǎn)由參數(shù)xmlnode指定,根節(jié)點(diǎn)對(duì)應(yīng)于0或“0”,子節(jié)點(diǎn)序號(hào)由參數(shù)ichild指定。
getcount
語(yǔ)法:result:=callobject(object,"getcount","objecttype","xmlnode")
說(shuō)明:返回指定xml節(jié)點(diǎn)的子節(jié)點(diǎn)或?qū)傩缘臄?shù)量。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定。參數(shù)objecttype取值為“#attribute”時(shí),該方法返回屬性的數(shù)量;取值為“#child”時(shí),該方法返回子節(jié)點(diǎn)的數(shù)量。
geterror
語(yǔ)法:result:=callobject(object,"geterror")
說(shuō)明:返回xml字符串解析過(guò)程中出現(xiàn)的錯(cuò)誤。
getname
語(yǔ)法:result:=callobject(object,"getname","xmlnode")
說(shuō)明:返回指定xml節(jié)點(diǎn)的名稱。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定。
gettext
語(yǔ)法:result:=callobject(object,"gettext","xmlnode")
說(shuō)明:如果指定xml節(jié)點(diǎn)的類型為text,則返回該節(jié)點(diǎn)的內(nèi)容。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定。
gettype
語(yǔ)法:result:=callobject(object,"gettype","xmlnode")
說(shuō)明:返回指定xml節(jié)點(diǎn)的類型,可能的返回值是element或text。節(jié)點(diǎn)號(hào)由參數(shù)xmlnode指定。
ignorewhitespace
語(yǔ)法:result:=callobject(object,"ignorewhitespace",ignore)
說(shuō)明:設(shè)置是否忽略元素開始標(biāo)記與結(jié)束標(biāo)記之間的空白字符(例如,回車,換行,tab或空格)。參數(shù)ignore可以為true或false。默認(rèn)的設(shè)置為true。
makelist
語(yǔ)法:result:=callobject(object,"makelist")
說(shuō)明:將xml字符串轉(zhuǎn)換為authorware列表。
newobject
語(yǔ)法:object:=newobject("xmlparser")
說(shuō)明:創(chuàng)建一個(gè)新的xmlparser xtra對(duì)象。
parsefile
語(yǔ)法:result:=callobject(object,"parsefile","file")
說(shuō)明:對(duì)指定url地址處的xml文檔進(jìn)行解析,參數(shù)file用于指定url地址。可以通過(guò)doneparsing方法檢測(cè)解析過(guò)程是否結(jié)束,通過(guò)parsemore方法來(lái)強(qiáng)制讀取和解析更多的數(shù)據(jù)。
parsemore
語(yǔ)法:result:=callobject(object,"parsemore")
說(shuō)明:解析更多的xml文檔。
parsestring
語(yǔ)法:result:=callobject(object,"parsestring",data)
說(shuō)明:對(duì)xml字符串進(jìn)行解析。參數(shù)"data"就是xml字符串。
新聞熱點(diǎn)
疑難解答