This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes xml output problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "xml output problem" Watch "xml output problem" New topic

xml output problem

katerina tsilibari

Joined: May 24, 2010
Posts: 1

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)
error += "\tNo suffix reg.exp. given.\n";
suffix = HtmlMethods.removeBreaks(replaceVariables(reg_is.child("end").content()));

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()));

for(Xml polh_is:fetchsite.child("site").child("poleis").children("polh")){ //url theloume mia for akoma
error += "Error in polh: name is - " + polh_is.string("name") + " with url - " + polh_is.content() + " -.\n";
for(int j=0; j<citylink.length; j++){
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

Joined: Sep 29, 2008
Posts: 12617

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!
It is sorta covered in the JavaRanch Style Guide.
subject: xml output problem
It's not a secret anymore!