6 Replies Latest reply on May 24, 2006 4:30 PM by Newsgroup_User

    Query XML Documents

    Level 7
      Hi All

      Does anyone know of a good Tag, CFC or UDF that will allow me to easily
      create CF recordsets from XML documents?? I need to be able to search and
      sort like I would be able to with a regular database query.

      Bill


        • 1. Re: Query XML Documents
          BKBK Adobe Community Professional & MVP
          >... create CF recordsets from XML documents?? I need to be able to search and sort [an XML document] like I would be able to with a regular database query.
          A database table is tabular, to be compared to a 2-D array. Whereas, an XML document is a tree. Searching and sorting XML therefore requires different strategies and tools. For example, in general, sorting doesn't make as much sense for XML as it does for queries, and searching will often involve recursion.


          • 2. Re: Query XML Documents
            Abinidi Level 1
            Look up the function XMLSearch(). It is pretty easy.
            • 3. Re: Query XML Documents
              LJBuesch
              I agree with BKBK. There is no reason to store XML in any sort of sorted order. If you have XML and you wish to have the output sorted however, you can use XSL and XPath to do a lot of the work.

              Check out these tutorials (w3schools.com):
              XSL
              XPath
              • 4. Re: Query XML Documents
                BKBK Adobe Community Professional & MVP
                XMLSearch(). It is pretty easy.
                Appearances can be deceptive. Nevertheless, the Coldfusion documentation on XMLSearch() mentions something about XPath, which LJBuesch talks about. Follow LJBuesch's links and you will soon be convinced that XPath and XSL are not easy.

                • 5. Re: Query XML Documents
                  Level 7
                  Thank guys.

                  I found this on the exchange and it appears to be working and exactly what I
                  was looking for.

                  xml2CFX.dllBill"BKBK" <webforumsuser@macromedia.com> wrote in message
                  news:e52bdm$h9m$1@forums.macromedia.com...
                  > <i> XMLSearch(). It is pretty easy.</i>
                  > Appearances can be deceptive. Nevertheless, the Coldfusion documentation
                  > on
                  > XMLSearch() mentions something about XPath, which LJBuesch talks about.
                  > Follow
                  > LJBuesch's links and you will soon be convinced that XPath and XSL are not
                  > easy.
                  >
                  >
                  >


                  • 6. Re: Query XML Documents
                    Level 7
                    that's xml2CFX.dll

                    Bill


                    "BKBK" <webforumsuser@macromedia.com> wrote in message
                    news:e52bdm$h9m$1@forums.macromedia.com...
                    > <i> XMLSearch(). It is pretty easy.</i>
                    > Appearances can be deceptive. Nevertheless, the Coldfusion documentation
                    > on
                    > XMLSearch() mentions something about XPath, which LJBuesch talks about.
                    > Follow
                    > LJBuesch's links and you will soon be convinced that XPath and XSL are not
                    > easy.
                    >
                    >
                    >