m.ajava

来自「本人历尽千辛万苦找的clustream中的jar包」· AJAVA 代码 · 共 28 行

AJAVA
28
字号
import org.w3c.dom.Element;import org.apache.axis.utils.XMLUtils;public class M{	public static void main (String[] args) {		String a = "http://stdsun.cis.ohio-state.edu/chenlia";		String b = "MyHostScript";		String c = "http://127.0.0.1:8080/ogsa/services/base/index/IndexService";		String d = "//ce:Host[//ce:Host/ce:ProcessorLoad[@ce:Last5Min<50]]";//		String d = "//ce:Host[//ce:Host/ce:ProcessorLoad]";		String e = "xmlns:ce=http://glue.base.ogsa.globus.org/ce/1.1";		//Element result[] = Find.Query("http://stdsun.cis.ohio-state.edu/chenlia/1", "MyHostScript", "http://127.0.0.1:8080/ogsa/services/base/index/IndexService", "//ce:Host[//ce:Host/ce:ProcessorLoad[@ce:Last5Min>50]]", "xmlns:ce=\"http://glue.base.ogsa.globus.org/ce/1.1\"");		Element result[] = QueryServiceDataByXPath.Query(b, c, d);		if(result == null)			System.out.println("no result");		else		{			System.out.println("the length is asfdasdkjf" + result.length);			for(int i = result.length - 1; i >=0 ; i--)//				XMLUtils.PrettyElementToStream(result[i], System.out);				System.out.println(result[i].getAttribute("ce:Name"));		}	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?