Dette vil hjælpe dig; Flagtag er testet med null-værdi. En anden værdi skal tilføjes i funktion.
DECLARE
vs_Xml VARCHAR2(32000):= '<List>
<Event>
<eventTime>2016-08-03T15:41:12.000+05:30</eventTime>
<e:PlaceHolder xmlns:e="http://dpmt.element.com">US</e:PlaceHolder>
<e:flag xmlns:e="http://dpmt.rmg.org/pq/rs">true</e:flag>
<e:flag1 xmlns:e="http://dpmt.rmg.org/pq/rs">false</e:flag1>
</Event>
<Event>
<eventTime>2016-08-01T19:41:12.000+05:30</eventTime>
</Event>
</List>';
vx_ParameterList XMLTYPE;
vx_Parameter XMLTYPE;
vn_ParameterIndex NUMBER;
vs_Key VARCHAR2(64);
vs_XPath VARCHAR2(255);
vs_Value VARCHAR2(10000);
vs_Value2 VARCHAR2(10000);
BEGIN
vx_ParameterList := xmltype(vs_Xml);
vn_ParameterIndex := 1;
vs_XPath := '/List/Event';
WHILE vx_ParameterList.existsNode(vs_XPath || '[' || vn_ParameterIndex || ']') = 1 LOOP
vx_Parameter := vx_ParameterList.extract(vs_XPath || '[' || vn_ParameterIndex || ']');
vs_Value := vx_Parameter.extract('//eventTime/text()').GetStringVal();
SELECT vx_Parameter.extract('//flag/text()', 'xmlns:e="http://dpmt.rmg.org/pq/rs"').GetStringVal() INTO vs_Value2 FROM DUAL; --Null value handling
vn_ParameterIndex := vn_ParameterIndex + 1;
dbms_output.put_line(vs_Value ||'-' || vs_Value2);
END LOOP;
END;
/