ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType = resourcePropertyValueChangeNotificationDocument.addNewResourcePropertyValueChangeNotification();
ResourcePropertyValueChangeNotificationType.OldValue oldValue = resourcePropertyValueChangeNotificationType.addNewOldValue();
XmlCursor parentCursor = oldValue.newCursor();
if ( parentCursor.toLastChild() )
{
parentCursor.toEndToken();
parentCursor.toNextToken();
}
parentCursor.toEndToken();
parentCursor.insertElement( new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd", "BaseFault" ));
System.out.println( "BEFORE:\n" + oldValue.xmlText( new XmlOptions().setSaveOuter() ) );