Possible Duplicate:
XML parsing in oracle pl/sql
In the below XML I need to get the Comment "ADOR Acknowledgement 2
"
Can you please help me to get this
<?xml version="1.0" encoding="utf-8"?>
<!--ADOR Acknowledgement 2-->
<AckTransmission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.irs.gov/efile">
<TransmissionHeader recordCount="1">
<Jurisdiction>ALABAMA</Jurisdiction>
<TransmissionId>1946157056</TransmissionId>
<Timestamp>2012-08-16T01:25:47-05:00</Timestamp>
<Transmitter>
<ETIN>00000</ETIN>
</Transmitter>
<ProcessType>T</ProcessType>
<AgentIdentifier>ACK</AgentIdentifier>
</TransmissionHeader>
<Acknowledgement>
<SubmissionId>X1684956672</SubmissionId>
<EFIN>X16849</EFIN>
<GovernmentCode>ALST</GovernmentCode>
<SubmissionType>XMLTOM</SubmissionType>
<TaxYear>9999</TaxYear>
<SubmissionCategory>MFET</SubmissionCategory>
<AcceptanceStatus>A</AcceptanceStatus>
<ContainedAlerts>0</ContainedAlerts>
<StatusDate>2012-08-16</StatusDate>
</Acknowledgement>
</AckTransmission>
Applying too many functions on the
XML
text may adversely affect performance, so as an alternative, something like this should work-here is the code to parse the comment from xml.
A combination of
replace
,extract
and and xpath expression could do: