The content of the XML body can be accessed using xpath notation. The state from which the order was shipped can be accessed from the purchase order xml event, as shown below:
rule monitor_po
activated by
msg of PurchaseOrder
then {
println("============== monitoring_po =============");
println("msg.po:purchaseOrder.po:shipTo.po:state = " +
msg["po:purchaseOrder/po:shipTo/po:state"]);
}