Hi,
I am having trouble trying to do an extract from an Xmltype.
The Xmltype, decisionXml, contains:
<Response xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os"><Result ResourceId="AuthZ/protected/resource"><Decision>Permit</Decision><Status><StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok"/></Status><ns2:Obligations xmlns:ns2="urn:oasis:names:tc:xacml:2.0:policy:schema:os"><ns2:Obligation FulfillOn="Permit" ObligationId="http://security.bea.com/ssmws/ssm-ws-1.0.wsdl#obligation_foo"><ns2:AttributeAssignment AttributeId="http://security.bea.com/ssmws/ssm-ws-1.0.wsdl#obligation_foo" DataType="http://www.w3.org/2001/XMLSchema#string">{salary=3000}</ns2:AttributeAssignment></ns2:Obligation></ns2:Obligations></Result></Response>
I need to get the value of the ns2:AttributeAssignment, i.e., the "{salary=3000}" as text.
I'm assuming that I have to use the form of the extract with namespace, but I have tried all kinds of variations, e.g.:
return_val := myDecisionXml2.extract('//ns2:AttributeAssignment/text()','xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os" xmlns:ns2="urn:oasis:names:tc:xacml:2.0:context:schema:os"').getStringVal();
but nothing is returning anything and the PL/SQL script seems to just end at that point (I have debug output after the above line, but that debug output never is output.
Thanks,
Jim