|
主题: 看看是没有坏处的
|
s22
职务:版主
等级:4
金币:10.0
发贴:1634
注册:2004/12/19 13:06:46
|
#12003/7/10 10:30:45
neoQueryXML = XmlParse( neoQueryData );
dsNames= XmlSearch( neoQueryXML, "/wddxPacket/data/array/struct/var/struct/var[@name='DRIVER' or @name='driver']" );
names= ArrayNew( 1 );
for( i=1; i LTE ArrayLen( dsNames ); i=i+1 )
names[i] = dsNames[i].XMLParent.XMLParent.XMLAttributes.name;
cfcInfo = XmlParse( results );
methods = ArrayNew( 1 );
if( not( filter EQ "" ))
filter = " and " & filter;
methodInfo = XmlSearch( cfcInfo, "/component/method[@access='remote'"& filter & "]" );
paramInfo= "";
methodData="";
paramXML= "";
methodNode= "";
for( i=1; i LTE ArrayLen( methodInfo ); i=i+1 ) {
methodNode = methodInfo[i];
methodData= StructNew();
methodData.name =methodNode.XmlAttributes.name;
methodData.params= ArrayNew( 1 );
methods[i] = methodData;
for( j=1; j LTE ArrayLen( methodNode.XmlChildren ); j=j+1 ) {
paramXML= methodNode.XmlChildren[j];
paramInfo = StructNew();
paramInfo.name = paramXML.XmlAttributes.name;
try {
paramInfo.type = paramXML.XmlAttributes.type;
}
catch( any e ) {
paramInfo.type ="";
}
methodData.params[j] = paramInfo;
}
}
cfcInfo = XmlParse( results );
methods = ArrayNew( 1 );
if( not( filter eq "" ))
filter = " and " & filter;
methodInfo = XmlSearch( cfcInfo, "/component/method[@access='remote'"& filter & "]" );
paramInfo= "";
methodData="";
paramXML= "";
methodNode= "";
for( i=1; i lte ArrayLen( methodInfo ); i=i+1 ) {
methodNode = methodInfo[i];
if( checkParamCountAndType( methodNode, 2 )) {
methodData= StructNew();
methodData.name =methodNode.XmlAttributes.name;
methodData.params= ArrayNew( 1 );
methods[i] = methodData;
for( j=1; j LTE ArrayLen( methodNode.XmlChildren ); j=j+1 ) {
paramXML= methodNode.XmlChildren[j];
paramInfo = StructNew();
paramInfo.name = paramXML.XmlAttributes.name;
try {
paramInfo.type = paramXML.XmlAttributes.type;
}
catch( any e ) {
paramInfo.type ="any";
}
methodData.params[j] = paramInfo;
}
}
}
cfcInfo = XmlParse( results );
methods = ArrayNew( 1 );
if( not( filter eq "" ))
filter = " and " & filter;
methodInfo = XmlSearch( cfcInfo, "/component/method[@access='remote'"& filter & "]" );
paramInfo= "";
methodData="";
paramXML= "";
methodNode= "";
for( i=1; i lte ArrayLen( methodInfo ); i=i+1 ) {
methodNode = methodInfo[i];
if( checkParamCountAndType( methodNode, 1 )) {
methodData= StructNew();
methodData.name =methodNode.XmlAttributes.name;
methodData.params= ArrayNew( 1 );
methods[i] = methodData;
for( j=1; j LTE ArrayLen( methodNode.XmlChildren ); j=j+1 ) {
paramXML= methodNode.XmlChildren[j];
paramInfo = StructNew();
paramInfo.name = paramXML.XmlAttributes.name;
try {
paramInfo.type = paramXML.XmlAttributes.type;
}
catch( any e ) {
paramInfo.type ="any";
}
methodData.params[j] = paramInfo;
}
}
}
result = ArrayLen( methodNode.XmlChildren ) gte count;
if( result ) {
for( p=1; p lte count; p=p+1 ) {
try {
result = result and ( node.XmlChildren[p].XmlAttributes.type eq "string" );
}
catch( any e ) {
result = result and true;
}
}
}
|
s22
职务:版主
等级:4
金币:10.0
发贴:1634
注册:2004/12/19 13:06:46
|
#22003/7/10 10:50:38
图片如下: 第一个函数的运行结果,一个数据库名称的列表.
|
s22
职务:版主
等级:4
金币:10.0
发贴:1634
注册:2004/12/19 13:06:46
|
#32003/7/10 10:56:35
图片如下: 第二个函数会把所有的在你JIQI上的CFC列出来 wEATHER.CFc是我做的天气预报的CFC
|
s22
职务:版主
等级:4
金币:10.0
发贴:1634
注册:2004/12/19 13:06:46
|
#42003/7/10 11:08:52
图片如下: 这个是第三个函数的运行结果 参数我填的 NAME:rssify.weather
编辑历史:[这消息被s22编辑过(编辑时间2003-07-10 11:09:20)]
|
雅痞公子
职务:普通成员
等级:3
金币:-3.0
发贴:732
注册:2003/3/27 23:16:34
|
#52003/7/10 14:28:37
保存,好好看看!
|