2 Replies Latest reply on May 22, 2008 2:06 PM by (Kevin_Althaus)

    Removing and truncating data when using XML Export

      Hello -

      I am using spry to pull data from a database using XML export in ADDT. I would like to take the results from the database and clean out the HTML and truncate the results. How can I do this?

      To be more exact: I am pulling RSS feeds from news sites and storing the rss items in a database. I am using spry/xml export to pull the results of these feeds and display them on a page. Sometimes there is HTML in the feed items (ie...the descriptions of the headline). How can I strip out this HTML using the XML export?

      I know the PHP code to actually sterilize the data, just not sure where in the xmlexport script to plug it in.

      thanks!
        • 1. Re: Removing and truncating data when using XML Export
          Günter Schenk Level 4
          Hi Kevin,

          the current XML export version is admittedly not suitable for handling HTML data, as it doesn´t put any data inside CDATA sections.

          ------
          How can I strip out this HTML using the XML export?
          ------

          I´m not aware of this functionality, but I´m sure it would have to be integrated into the respective "includes" files in order to become effective.

          However, you might consider using the manual "converting database queries to XML" approach explained on this page: http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html -- this will give you notably more freedom to e.g. preprocess some data before it´s getting stuffed inside an XML node.

          ------
          I am pulling RSS feeds from news sites and storing the rss items in a database
          ------

          Would it be possible to rather sanitize the data before it´s getting stored in the database ?

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: Removing and truncating data when using XML Export
            Level 1
            Hello Günter,

            thanks for the response! I am in the process of manually putting together an 'xmlexport' as described in the link above.

            I could sanitize the information going into the database, but I really want to keep that info untouched and do post processing.

            thanks for the help
            Kevin