This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

xml output problem

 
katerina tsilibari
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hello there i'm new in java and i have this problem to deal with
(in this part i do the parsing for my xml,i use to 2Dtables in oreder to get the regex and the url of each city)
if(reg_is.child("end").content()=="")
error += "\tNo suffix reg.exp. given.\n";
else
suffix = HtmlMethods.removeBreaks(replaceVariables(reg_is.child("end").content()));

}
else{
poleis[k][0]= HtmlMethods.removeBreaks(reg_is.string("name"));
poleis[k][1] = HtmlMethods.removeBreaks(replaceVariables(reg_is.child("start").content()));
poleis[k][2] = HtmlMethods.removeBreaks(replaceVariables(reg_is.child("end").content()));
k++;
}
}
}

for(Xml polh_is:fetchsite.child("site").child("poleis").children("polh")){ //url theloume mia for akoma
if((polh_is.string("name")=="")||(polh_is.content()==""))//attribute
error += "Error in polh: name is - " + polh_is.string("name") + " with url - " + polh_is.content() + " -.\n";
else
for(int j=0; j<citylink.length; j++){
citylink[j][0]=HtmlMethods.removeBreaks(polh_is.string("name"));
citylink[j][1]=HtmlMethods.removeBreaks(polh_is.string("with url -"+polh_is.content() +"-.\n"));

}
}
in this part i do the parsing from my xml and because of the fact that i don't have a specific number of cities i should create a second 2D table in order to save the url of each new city i add in my xml so i don't no if this is right because my project can't be run it makes no output because i haven't finished that (this is my other problem)
my project is about gathering weather predictions from different sites and put them in one xml for each city so i'm very stucked!!i ;; be very thankfull if anyone could help>
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.

And welcome to JavaRanch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic