It looks like the getNameSpaceCount method of the XMLStreamReader created from an XMLObject is not behaving similar to
an XMLStreamReader created via Stax or Woodstox.

e.g. creating an XMLStreamReader from an XMLObject whose xml representation looks like this and running it through a test case yields nothing. Whereas creating the reader from Woodstox yields:

Namespace  : http://www.paraware.com/2005/PriceAndAvailabilityCheckResponse
Namespace xsi : http://www.w3.org/2001/XMLSchema-instance

This appears to be a bug.  Can someone verify this?

Thanks.

Brian



Sample Document

<?xml version="1.0" encoding="UTF-8"?>
<PriceandAvailabilityResponse xmlns="http://www.paraware.com/2005/PriceAndAvailabilityCheckResponse";>
 <Header/>
 <Body>
   <ListOfItemDetail>
     <ItemDetailList>
       <PartNumbers>
<UPC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
       </PartNumbers>
     </ItemDetailList>
   </ListOfItemDetail>
 </Body>
</PriceandAvailabilityResponse>


Test Case

       while (reader.hasNext())
       {
           int event = reader.next();

           if (event == XMLStreamReader.START_ELEMENT)
           {

               for (int i = 0; i < reader.getNamespaceCount(); i++)
               {
System.out.println("Namespace " + reader.getNamespacePrefix(i) + " : "
                           + reader.getNamespaceURI(i));
               }
           }
       }

--
Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to