Search Results

Search found 38 results on 2 pages for 'c0mrade'.

Page 2/2 | < Previous Page | 1 2 

  • Parsing xml with dom4j or jdom or anyhow

    - by c0mrade
    Hello, I wanna read feed entries and I'm just stuck now. Take this for example : http://stackoverflow.com/feeds/question/2084883 lets say I wanna read all the summary node value inside each entry node in document. How do I do that? I've changed many variations of code this one is closest to what I want to achieve I think : Element entryPoint = document.getRootElement(); Element elem; for(Iterator iter = entryPoint.elements().iterator(); iter.hasNext();){ elem = (Element)iter.next(); System.out.println(elem.getName()); } It goes trough all nodes in xml file and writes their name. Now what I wanted to do next is if(elem.getName() == "entry") to get only the entry nodes, how do I get elements of the entry nodes, and how to get let say summary and its value? tnx

    Read the article

  • Check for messages apache Qpid

    - by c0mrade
    Is it possible to check for messages from Qpid queue from unix/windows console? Here is how I check via GUI : http://i47.tinypic.com/pbu5d.gif I can see all the info from Qpid JMX Management Console, is there a something close to this that I can use in console?

    Read the article

  • XML child node attribute value

    - by c0mrade
    I'm trying to read xml file, ex : <entry> <title>FEED TITLE</title> <id>5467sdad98787ad3149878sasda</id> <tempi type="application/xml"> <conento xmlns="http://mydomainname.com/xsd/radiofeed.xsd" madeIn="USA" /> </tempi> </entry> Here is the code I have so far : public void parseXML(String xml) { try { InputStream inputStream = new ByteArrayInputStream(xml.getBytes()); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(inputStream); doc.getDocumentElement().normalize(); System.out.println("Root element " + doc.getDocumentElement().getNodeName()); NodeList nodeLst = doc.getElementsByTagName("entry"); System.out.println("Information of all entries"); for (int s = 0; s < nodeLst.getLength(); s++) { Node fstNode = nodeLst.item(s); if (fstNode.getNodeType() == Node.ELEMENT_NODE) { Element fstElmnt = (Element) fstNode; NodeList title = fstElmnt.getElementsByTagName("title").item(0).getChildNodes(); System.out.println("Title : " + ((Node) title.item(0)).getNodeValue()); NodeList id = fstElmnt.getElementsByTagName("id").item(0).getChildNodes(); System.out.println("Id: " + ((Node) update.item(0)).getNodeValue()); NodeList contento= fstElmnt.getElementsByTagName("tempi").item(0).getChildNodes(); System.out.println("Contento : " + ((Node) content.item(0)).getFirstChild().getAttributes()); // with this line above I'm having problems, I get null pointer exception } } } catch (Exception e) { e.printStackTrace(); } } How can I read/get, contento tag attributes? I'm using org.w3c.dom lib.

    Read the article

  • Strange IE7 behaviors(or not)

    - by c0mrade
    I see no reason why this shouldn't work in all browsers, here is my css for anchor tag : .myButton{ background:none repeat scroll 0 0 #FFFFFF; border:1px solid #D8DFEA !important; color:#3B5998; cursor:pointer; font-size:20px; padding:10px; } Here is how it looks in IE7 : And here is how it looks in other browsers : HTML is nothing unusual as well : <a href="#" class="myButton">Beta</a> All of this is inside table, this anchor html is wrapped around with : <tr> <td><a>...</a></td> <tr> I don't think this has to do it with anything but I mentioned it just in case, so the button is missing border top, any indications what might cause this?

    Read the article

  • Grouping items in php

    - by c0mrade
    Hello, I have a problem with sorting items in table in PHP. Here is what I want to achieve : Item Item Item Item Item Item Item Item Item Item Item Item Item Item Item How I mean to achieve this, well since I have a for each loop I can insert counter, and say after 5th item is listed write to another column, the thing is I'm not good with tables, I've tried something like : for(...) $counter++; if(($counter%5) == 0){ echo ""; } Not happening .. I hope you understood what I meant .. tnx

    Read the article

  • Creating Dynamic variables from json response

    - by c0mrade
    My JSON response looks like this : {"sample":[{"id":"2","name":"branch name"},{"id":"3","name":"branch name 2"}]} My function looks like this : function getJSONObjects(){ $.getJSON("http://localhost/api/branches", function(data){ $.each(data.sample, function(i,item){ var loc = "branch"; eval("var " + loc + item.id + "=123;"); alert(loc + item.id); }); }); } The idea is to create branch + id object so I can do something with it(create marker on a map), so I tried to assign it any value to see if this was working. I wanted both branch2 and branch3 to alert 123 so I have something to start with. But currently this alerts branch2 and branch3 instead of 123. I have little experience with creating dynamic variables/objects can someone tell me what I'm doing wrong or maybe another approach towards solving this?

    Read the article

  • Problems with textarea focus

    - by c0mrade
    My textarea is behaving very strange, when I click inside it .. the cursor appears there when I click, if I click on the middle of the textarea it appears there, and I'd like it to appear on the beginning wherever I click inside, like here on SO when asking question, wherever you click inside textarea it takes your cursor to the topmost left. What can I do to fix this?

    Read the article

  • Maven profile for single module

    - by c0mrade
    I have a multi module maven project, which builds successfully, I'd like to build just one of the modules I have. How would I do that with profiles ? I could do it from console in two ways, one way is go to the child module and mvn package or I could use reactor to build just one module. Can I do the same thing with profiles? By modifying POM? Thank you EDIT If is impossible from POM, can I do it from settings.xml ?

    Read the article

  • Problems with multi-line comments jquery

    - by c0mrade
    Hello, I'm making a image website with a bunch of images on the website, and below every image there is possibility of commenting the image and after that comments gets displayed without page loading and the comment content, the problem is when I have long comments which break the current line they don't get displayed since my comment box css overflow is hidden. Here is example : This is a comment - This is displayed properly This is a comment This is a comment This is a comment - this is not displayed properly since it break line. Here is the jQuery code for this : $.ajax({ type: "POST", url: "<?=base_url()?>imagesform/post_comment", data: datas, success: function () { $("#image-comments-" + image_id).attr("class", "comments"); $("#image-comments-" + image_id).append("<li id=\"new_append_" + image_id+ "\">" + $("#image").find(".comment").val() + "</li>").children(':last').height($('.comments li:last').height()).hide().slideDown(500, function () { var bodyHeight = $('html').height(); $('.addComment').fadeOut(300, function () { $('html').height(bodyHeight); }); }); alert($("#image").find(".comment").val()); } }); Here the $("#image").find(".comment").val() is the value of the text-area in which comment is inputted, when I alert it the whole multi line input is there put its not being appended to the li properly, that is part when I get confused, any suggestions why only part of the inputted string is appended?

    Read the article

  • How to remove focus from submit button

    - by c0mrade
    How can I remove focus from submit button? I don't know why it is there in the first plate, and it looks really ugly here is a screenshot : And here is how it should look like, it regains its appearance after I click beside it and hover it.

    Read the article

  • Get file full path in java

    - by c0mrade
    When I pass File file to a method I'm trying to get its full path like file.getAbsolutePath(); I always get the same result no matter which one I use either absolute or canonical path PATH_TO_MY_WORKSPACE/projectName/filename and it is not there, how can I get exact location of the file? Thank you

    Read the article

< Previous Page | 1 2