XMLSearch not picking up values with xmlns declaration

Posted on 2007-08-01
Last Modified: 2013-12-20
Can anyone explain why the following coldfusion code:

<cfset webtags=XMLSearch(templateXml, "*//cfinvoke")>

.. does not pick up my <cfinvoke> tags when the <html> root element has the following xmlns value:

<html xmlns="">

Note that when i remove the xmlns completely it works fine.

Any ideas?
Question by:paddycobbett
    LVL 1

    Author Comment

    btw.. as i mentioned it works fine with the xmlns removed, can I also be reassured that the Xpath is fine.. i.e. it should pick up <cfinvokes> at any depth within the whole xml document. I'm sure the Xpath is fine, but can't think why the xmlns causes problems??
    LVL 9

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    The CRUD Functions CRUD, meaning "Create, Read, Update, Delete (,_read,_update_and_delete)" is a common term to data base developers.  It describes the essential functions of data base table maintenance.  This art…
    "Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now