I'm working on a java application (in netbeans) that uses data in a SharePoint list. I follow this tutorial to retrieve data from SharePoint: http://davidsit.wordpress.com/2010/02/10/reading-a-sharepoint-list-with-java-tutorial/
The good thing is, it works. The bad news is, I get a warning which I can't seem to fix.
a condensed snippet:
Lists service = new Lists();
ListsSoap port = service.getListsSoap();
GetListItemsResponse.GetListItemsResult result = port.getListItems(
"myListName", "", null, null, "9999", null, "" );
Object resultNode = result.getContent().get( 0 );
NodeList list = ((com.sun.org.apache.xerces.internal.dom.ElementImpl)data)
.getElementsByTagName( "myTag" );
It is this last line, that is causing the following warning:
warning: com.sun.org.apache.xerces.internal.dom.ElementImpl
is Sun proprietary API and may be removed in a future release
Obviously, I need to find an alternative to this ElementImpl class. I tried googling, looking at docs, but haven't found anything useful.
Any help would be appreciated.
Why not just cast to
org.w3c.dom.Element
It is very unlikely, that you need any property from the Xerces implementation, so just stick with the DOM API types, which is what you're already doing by referencing org.w3c.dom.NodeList
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With