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

Thread: Parse THIS!!! XML can't contain HTML (anchor tags)???

Threaded View

  1. #1
    Join Date
    Aug 2005
    Posts
    7

    Angry Parse THIS!!! XML can't contain HTML (anchor tags)???

    Is there a way to parse XML that has HTML tags and special characters within it?

    I've been searching for days for a solution with no joy.
    The Oracle scripts I wrote below work fine as long as only alphanumeric characters are in the XML doc.

    Here's what I'm doing...I'm page scraping several dynamic websites using ColdFusion. I remove all the unneeded HTML...and replace the remaining HTML with XML tags.

    I then want to pass this XML (attached txt file) variable (cfxml) to Oracle so it can be parsed and loaded into the database. If I remove the anchor tags and the CDATA tags...the code works fine....but I want the anchor tags loaded into my table.

    Anyone have any suggestions....preferably a solution so I can stop pulling my damn hair out.

    ---------------------------------------------------------
    Oracle Scripts
    ---------------------------------------------------------
    create or replace procedure LoadXML (cfxml in varchar) AS
    begin
    insert into JOBS (xmldoc) values
    (xmltype.createxml(cfxml));
    end;

    create or replace trigger job_bifert as
    begin
    if (:new.xmldoc is null) then
    return;
    end if;
    select
    xmltype.getstringval(:new.xmldoc.extract('/recordset/row/title/text()')),
    xmltype.getstringval(:new.xmldoc.extract('/recordset/row/company/text()')),
    xmltype.getstringval(:new.xmldoc.extract('/recordset/row/location/text()'))
    into :new.title, :new.company, :new.location
    from dual;
    end;
    Attached Files Attached Files

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