string.xml解析一例

admin2020-12-09  520

import string.xml;

var html=string.xml(网页源码2);
var eleRecords = html.queryEles(tagName="input";)
text=""
for i,record in table.eachIndex(eleRecords){
	if( record.name!=null){
		value=record.value
		name=record.name
		text += string.concat(name, '=' ,value,'&')
		//text += string.concat(name,'=',value)
		//text=text+name+"="+value+" &"
	}
}
import inet.url ;
return inet.url.encodeUri(text);

 

t={}
for i,record in table.eachIndex(eleRecords){
		if( record.name !=null){
    			value=record.value
    			name=record.name
    			table.push(t,string.concat(name,'=',value))
				//text=text+name+"="+value+"&"
		}
	}
text=string.join(t,"&")
//text=string.left(text,#text-1) //#text代表text的长度
转载请注明原文地址: https://seopai.com/read-36.html
最新回复(0)
aardio问答
aardio编程语言