How does one store and extract XML data from Oracle?

XML data can be stored in Oracle (9.2.0 and above) using the XMLType data type. Look at this example:

connect scott/tiger

create table XMLTable (doc_id number, xml_data XMLType);

insert into XMLTable values (1,
        XMLType('<FAQ-LIST>
           <QUESTION>
                <QUERY>Question 1</QUERY>
                <RESPONSE>Answer goes here.</RESPONSE>
           </QUESTION>
        </FAQ-LIST>'));

select extractValue(xml_data, '/FAQ-LIST/QUESTION/RESPONSE')  -- XPath expression
from   XMLTable
where  existsNode(xml_data, '/FAQ-LIST/QUESTION[QUERY="Question 1"]') = 1;