Project

General

Profile

« Previous | Next » 

Revision 5649

Added by Duane Costa over 13 years ago

Bug fix for #5241: OAI-PMH: ListRecords verb returns content containing XML processing instructions.

View differences:

Eml200.java
75 75
    String emlDoc = xmlRec.trim();
76 76
    
77 77
    /*
78
     * Remove the lead xml processing instruction because the document is going
78
     * Remove leading XML processing instructions because the document is going
79 79
     * to be placed inside an OAI <metadata> element.
80 80
     */
81
    if (emlDoc.startsWith("<?")) {
81
    while (emlDoc.startsWith("<?")) {
82 82
      int offset = emlDoc.indexOf("?>");
83
      emlDoc = emlDoc.substring(offset + 2);
83
      emlDoc = emlDoc.substring(offset + 2).trim();
84 84
    }
85 85
      
86 86
    return emlDoc;

Also available in: Unified diff