Search Results

Search found 2 results on 1 pages for 'personman'.

Page 1/1 | 1 

  • Java: Ignoring escapes when parsing XML

    - by Personman
    I'm using a DocumentBuilder to parse XML files. However, the specification for the project requires that within text nodes, strings like " and < be returned literally, and not turned into the corresponding ASCII values. A previous similar question, http://stackoverflow.com/questions/1979785/read-escaped-quote-as-escaped-quote-from-xml, received one answer that seems to be specific to Apache, and another that appears to simply not not do what it says it does. I'd love to be proven wrong on either count, however :) For reference, here is some code: file = new File(fileName); DocBderFac = DocumentBuilderFactory.newInstance(); DocBder = DocBderFac.newDocumentBuilder(); doc = DocBder.parse(file); NodeList textElmntLst = doc.getElementsByTagName(text); Element textElmnt = (Element) textElmntLst.item(0); NodeList txts = textElmnt.getChildNodes(); String txt = ((Node) txts.item(0)).getNodeValue(); System.out.println(txt); I would like that println() to produce things like &quot;3&gt;2&quot; instead of "3>2" which is what currently happens. Thanks!

    Read the article

  • Question About Eclipse Java Debugger Conditional Breakpoints Inefficiency

    - by Personman
    I just set a conditional breakpoint in Eclipse's debugger with a mildly inefficient condition by breakpoint standards - checking whether a HashMap's value list (8 elements) contains Double.NaN. This resulted in an extremely noticeable slowdown in performance - after about five minutes, I gave up. Then I copy pasted the condition into an if statement at the exact same line, put a noop in the if, and set a normal breakpoint there. That breakpoint was reached in the expected 20-30 seconds. Is there something special that conditional breakpoints do that is different from this, or is Eclipse's implementation just kinda stupid? It seems like they could fairly easily just do exactly the same thing behind the scenes.

    Read the article

1