我试图通过取所有" <Type>"元素来解析URL中的XML文件,其中参数type_id ="4218"??
XML文档:
<BSQCUBS Version="0.04" Date="Fri Dec 9 11:43:29 GMT 2011" MachineDate="Fri, 09 Dec 2011 11:43:29 +0000">
<Class class_id="385">
<Title>Football Matches</Title>
<Type type_id="4264" type_minbet="0.1" type_maxbet="2000.0">
...
</Type>
<Type type_id="5873" type_minbet="0" type_maxbet="0">
...
</Type>
<Type type_id="4725" type_minbet="0.1" type_maxbet="2000.0">
...
</Type>
<Type type_id="4218" type_minbet="0.1" type_maxbet="2000.0">
...
</Type>
<Type type_id="4221" type_minbet="0.1" type_maxbet="2000.0">
...
</Type>
<Type type_id="4218" type_minbet="0.1" type_maxbet="2000.0">
...
</Type>
<Type type_id="4299" type_minbet="0.1" type_maxbet="2000.0">
...
</Type>
</Class>
</BSQCUBS>
Run Code Online (Sandbox Code Playgroud)
这是我的Java代码:
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new URL("http://cubs.bluesq.com/cubs/cubs.php?action=getpage&thepage=385.xml").openStream());
doc.getDocumentElement().normalize();
NodeList nodeList …Run Code Online (Sandbox Code Playgroud) 对于我的Tapestry作业,我必须在字符串数组的桌子上显示一个钻石.这是我到目前为止所拥有的:
代码Index.java
public class Index
{
@Property
private Integer number;
@Property
private String [] table;
public Index() {
number = 9;
int temp = 0;
String tmp = "-";
table = new String[number * number];
if(singleCell == null)
singleCell="";
for (int i = 0; i < number; i++) {
for (int j = 0; j < number; j++) {
table[temp] = tmp;
temp++;
}
}
}
@OnEvent(component="diamond")
Object onDiamondLink() {
String swapValue = "*";
int sum = number / 2 …Run Code Online (Sandbox Code Playgroud) 我使用带有spring和hibernate的tapestry 5,我尝试构建我的应用程序抛出我的这个异常??? !!! ???什么是问题,任何建议都会是这样的relif ????
[WARNING] Some problems were encountered while building the effective model for com.fit:rent-a-car:war:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 194, column 18
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 235, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
.....
.....
[ERROR] ioc.Registry No service implements …Run Code Online (Sandbox Code Playgroud)