Author: mrglavas
Date: Sun Aug 13 21:04:51 2006
New Revision: 431289
URL: http://svn.apache.org/viewvc?rev=431289&view=rev
Log:
Fixing another bug reported by Lucian Holland on the j-dev list.
The parameters passed to the QName constructor in the getName()
method were in the wrong order.
Modified:
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/DOMXMLStreamReaderImpl.java
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/SAXXMLStreamReaderImpl.java
Modified:
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/DOMXMLStreamReaderImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/stax-dev/src/org/apache/xerces/stax/DOMXMLStreamReaderImpl.java?rev=431289&r1=431288&r2=431289&view=diff
==============================================================================
---
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/DOMXMLStreamReaderImpl.java
(original)
+++
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/DOMXMLStreamReaderImpl.java
Sun Aug 13 21:04:51 2006
@@ -1068,7 +1068,7 @@
public QName getName() {
// DOM Level 2
if(curType == XMLStreamConstants.START_ELEMENT || curType ==
XMLStreamConstants.END_ELEMENT){
- return new QName(getLocalName(), getNamespaceURI());
+ return new QName(getNamespaceURI(), getLocalName());
}
throw new IllegalStateException(
"The current event is not START_ELEMENT or END_ELEMENT.");
Modified:
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/SAXXMLStreamReaderImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/stax-dev/src/org/apache/xerces/stax/SAXXMLStreamReaderImpl.java?rev=431289&r1=431288&r2=431289&view=diff
==============================================================================
---
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/SAXXMLStreamReaderImpl.java
(original)
+++
xerces/java/branches/stax-dev/src/org/apache/xerces/stax/SAXXMLStreamReaderImpl.java
Sun Aug 13 21:04:51 2006
@@ -836,9 +836,10 @@
*/
public QName getName() {
if (curType == XMLStreamConstants.START_ELEMENT || curType ==
XMLStreamConstants.END_ELEMENT) {
- return new QName(getLocalName(), getNamespaceURI());
+ return new QName(getNamespaceURI(), getLocalName());
}
- return null;
+ throw new IllegalStateException(
+ "The current event is not START_ELEMENT or END_ELEMENT.");
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]