help with xml
- From: "Stephens, Chris" <chris_stephens@xxxxxxxxxxxx>
- To: <oracle-l@xxxxxxxxxxxxx>
- Date: Tue, 23 Sep 2008 15:51:41 -0500
Can someone help me with the following: I have a table: CREATE TABLE "HTS"."HTS_XML2" ( "ID" NUMBER, "NAME" VARCHAR2(90 BYTE), "FILENAME" VARCHAR2(400 BYTE), "MIME_TYPE" VARCHAR2(48 BYTE), "UPLOADED_BY" VARCHAR2(100 BYTE), "CLOB_CONTENT" "HTS"."XMLTYPE" ) In that table I have 1 row. Clob_content contains an xml file: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <microplateDoc xmlns="http://moleculardevices.com/microplateML"> <fileVersion>2.0.7</fileVersion> <experimentSection sectionName="Experiment#1"> <plateSection> <plateType>PlateType</plateType> <plateSectionName>Plate#1</plateSectionName> <plateReadTime> 2:10 PM 8/27/2008 </plateReadTime> <instrumentInfo>PLUS190PC ROM v1.21 Aug 18 2005</instrumentInfo> </plateSection> </experimentSection> </microplateDoc> I am trying to pull out the plateType value with: select extract(clob_content,'/microplateDoc/experimentSection/plateSection/plat eType/text()') from hts_xml2; or select extractvalue(clob_content,'/microplateDoc/experimentSection/plateSection /plateType') from hts_xml2; or any other iteration I've been able to think of. How do I get at that value and if <plateType> occurs more than once in the file how do I extract all occurrences of that value? Thanks, Chris CONFIDENTIALITY NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by email reply.
- Re: help with xml
- From: Michael Garfield Sørensen
- Re: help with xml