You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Dan Diephouse <da...@envoisolutions.com> on 2004/10/27 07:12:45 UTC

XmlObject and newXMLStreamReader bug

I am attempting to use the method "newXMLStreamReader()" which resides 
on XmlObject.  However, I find that the stream starts at the child 
elements instead of the current XmlObject.

For instanace, the following shows me building an Amazon request:

        ItemLookupDocument req = ItemLookupDocument.Factory.newInstance();
        ItemLookup lookup = req.addNewItemLookup();

        lookup.setSubscriptionId(".......");
        lookup.setAssociateTag("dandiephosblo-20");
        ItemLookupRequest ilr = lookup.addNewRequest();
        ilr.addItemId("0486411214");
        ilr.setIdType(ItemLookupRequest.IdType.ASIN);

        XMLStreamReader reader = req.newXMLStreamReader();
        System.out.println("Local name: " + reader.getLocalName());

Instead of printing out "Local name: ItemLookupDocument" it prints out 
"Local name: ItemLookup" - the child element.  I would assume that this 
is a bug.  Can anyone confirm that it is or is not supposed to behave 
this way?

Thanks,
- Dan

-- 
Dan Diephouse
Envoi Solutions LLC
http://envoisolutions.com/people/dan


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org