xmlCursor.toPrevToken( );
XmlObject object = xmlCursor.getObject( );
xString1 = (XmlString) object.set( xString2 );
System.out.println( xString1 );
ResourcePropertyValueChangeNotificationDocument resourcePropertyValueChangeNotificationDocument =
ResourcePropertyValueChangeNotificationDocument.Factory.newInstance( );
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( ) ) );
parentCursor.toPrevSibling( );
XmlObject childXBean = parentCursor.getObject( );
parentCursor.dispose( );
//BaseFaultDocument baseFaultDocument = BaseFaultDocument.Factory.newInstance( );
//BaseFaultType baseFaultType = baseFaultDocument.addNewBaseFault();
BaseFaultType baseFaultType = BaseFaultType.Factory.newInstance( );
baseFaultType.setTimestamp( Calendar.getInstance( ) );
childXBean.set( baseFaultType );
System.out.println( "AFTER:\n" + oldValue.xmlText( new XmlOptions( ).setSaveOuter( ) ) );
ResourcePropertyValueChangeNotificationDocument resourcePropertyValueChangeNotificationDocument1 =
ResourcePropertyValueChangeNotificationDocument.Factory.newInstance( );
ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType1 =
resourcePropertyValueChangeNotificationDocument.addNewResourcePropertyValueChangeNotification( );
ResourcePropertyValueChangeNotificationType.OldValue oldValue1 =
resourcePropertyValueChangeNotificationType1.addNewOldValue( );