From 4d6f91ddd8726b0e0663e2711764a156930ce982 Mon Sep 17 00:00:00 2001 From: "Keith W. Campbell" Date: Thu, 5 Dec 2024 19:31:14 -0500 Subject: [PATCH] XMLParser: support attributes with empty values Signed-off-by: Keith W. Campbell --- .../src/com/oti/j9/exclude/XMLParser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/functional/J9 Exclude File Support/src/com/oti/j9/exclude/XMLParser.java b/test/functional/J9 Exclude File Support/src/com/oti/j9/exclude/XMLParser.java index bc99ee7857e..41d39441a08 100644 --- a/test/functional/J9 Exclude File Support/src/com/oti/j9/exclude/XMLParser.java +++ b/test/functional/J9 Exclude File Support/src/com/oti/j9/exclude/XMLParser.java @@ -255,10 +255,10 @@ private String _scan_attribute_value() throws XMLException XMLStringBuffer buffer = new XMLStringBuffer(); - do { + while (_fScan != '"') { buffer.append(_fScan); scan_char(); - } while ( _fScan != '"' ); + } // Advance past the final quote scan_char(); @@ -396,6 +396,9 @@ private void _scan_element_or_instruction() throws XMLException Hashtable attributes = _scan_attributes(); // Notify the content handler + if (VERBOSE) { + System.out.format("%nAbout to start <%s> at level %d%n", elementName, _fLevel + 1); + } _fDocumentHandler.xmlStartElement(elementName, attributes); _fLevel++;