DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: xml question

  1. #1
    Join Date
    Apr 2002
    Posts
    135
    hai,

    Like in the XMLType column , i store the xmlformated data as such.
    And is it possible to query only required elements from the stored data .Using XPAth or something .
    I have no idea.Is it possible

    cheers
    Good Judgement comes from Experience.
    Experience comes from Bad Judgement

  2. #2
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    342
    I think you find the info you want here :

    http://otn.oracle.com/docs/products/...re.htm#1024805

    Regards
    Gert

  3. #3
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    Hope u are looking for the second one .

    XML_TAB3 ( XMLVAL XMLTYPE, ID NUMBER);

    try this
    SELECT e.id FROM xml_tab3 e
    WHERE e.xmlval.extract('//AUTHOR/text()') LIKE 'ab%';

    or

    SELECT e.id from xml_tab3 e
    where (SUBSTR(sys.xmlType.getStringVal(sys.xmlType.extract(e.xmlval, '//AUTHOR/text()')), 1, 10)) like 'ab%';

    siva prakash
    DBA

  4. #4
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  5. #5
    Join Date
    Apr 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    1,203
    Can you SORT the extracted values? Also, can you user comparison operators on extraced values i.e.

    SELECT e.id FROM xml_tab3 e
    WHERE e.xmlval.extract('//AUTHOR_ID/number()') < 5;

    ??????

    Cheers,
    OCP 8i, 9i DBA
    Brisbane Australia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width