Ignore:
Timestamp:
2007-07-09T10:28:07+12:00 (17 years ago)
Author:
xiao
Message:

change getFirstChild() to getFirstElementChild() in case an extra line break or white space added before the first element child which might cause a cast exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/action/NoCollQueryAction.java

    r13270 r14226  
    153153    Document owner = result_list.getOwnerDocument();
    154154    Node child = from_list.getFirstChild();
    155     while (child != null) {
     155    while (child != null && child.getNodeType() == Node.ELEMENT_NODE) {
    156156        ((Element)child).setAttribute("collection", collection);
    157157        result_list.appendChild(owner.importNode(child, true));
Note: See TracChangeset for help on using the changeset viewer.