private GOMFeed startFeedDocument(GOMDocument aDocument)
throws XMLStreamException {
aDocument.setVersion(this.streamReader.getVersion());
aDocument.setCharacterEncoding(this.streamReader
.getCharacterEncodingScheme());
GOMFeed feed = this.factory.createFeed();
if (next() != XMLStreamConstants.START_ELEMENT)
throw new GDataParseException("Expected start of feed element");
processAttributes(feed);
this.parserStack.push(feed);
int count = this.streamReader.getNamespaceCount();
for (int i = 0; i < count; i++) {
GOMNamespace namespace = new GOMNamespace(this.streamReader
.getNamespaceURI(i), this.streamReader
.getNamespacePrefix(i));
System.out.println(namespace);
feed.addNamespace(namespace);
}
return feed;
}