Java – How to use FeatureContent with XMLStreamReader?

I woudlike to use feature content with using XMLStreamReader but I have the same error :

class cannot be cast to class

Java :

    FeatureContent fc = new FeatureContent();
    XMLOutputFactory outputFactory = XMLOutputFactory.newFactory();
    XMLStreamReader eventReader = factory.createXMLStreamReader((InputStream) fc.getGMLEventReader(gmlFile));

Read more here:

Content Attribution

This content was originally published by Software14 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: