5 Replies Latest reply on May 7, 2008 11:34 AM by (shane_mosier)

    Please help, Export Recordset as XML & Schema

      Hi - I am using the export recordset to xml function and need to somehow change the schema of the exported xml file.

      Right now, the code created by the behaviour is:

      // Begin XMLExport whitepapers_ph
      $xmlExportObj = new XMLExport();
      $xmlExportObj->setRecordset($whitepapers_ph);
      $xmlExportObj->addColumn("whitepaper_id", "whitepaper_id");
      $xmlExportObj->addColumn("whitepaper_company", "whitepaper_company");
      $xmlExportObj->addColumn("whitepaper_image", "whitepaper_image");
      $xmlExportObj->addColumn("whitepaper_title", "whitepaper_title");
      $xmlExportObj->addColumn("whitepaper_descriptor", "whitepaper_descriptor");
      $xmlExportObj->addColumn("whitepaper_posted", "whitepaper_posted");
      $xmlExportObj->addColumn("whitepaper_itsecurity", "whitepaper_itsecurity");
      $xmlExportObj->addColumn("whitepaper_phsecurity", "whitepaper_phsecurity");
      $xmlExportObj->addColumn("whitepaper_file", "whitepaper_file");
      $xmlExportObj->setMaxRecords("ALL");
      $xmlExportObj->setDBEncoding("UTF-8");
      $xmlExportObj->setXMLEncoding("UTF-8");
      $xmlExportObj->setXMLFormat("NODES");
      $xmlExportObj->setRootNode("whitepapers_ph");
      $xmlExportObj->Execute();
      // End XMLExport whitepapers_ph

      How can I modify this so that whitepaper_company is the parent row node, with all other columns as children? Am I even going about this the right way?

      Thanks
      Dan
        • 1. Re: Please help, Export Recordset as XML & Schema
          Level 1
          Can any moderators of this forum please take a look at this post? Is there a way to modify the schema of the output XML from the server behaviour? If not, is there another way of exporting XML for use with SPRY that will allow you to set parent/child nodes?
          • 2. Re: Please help, Export Recordset as XML & Schema
            Günter Schenk Level 4
            Hi Jon,

            have never seen that option in the export recordset to xml - wizard, so it assumingly doesn´t exist.

            -----
            If not, is there another way of exporting XML for use with SPRY that will allow you to set parent/child nodes?
            -----

            Seems you will have to handcode stuff which ADDT´s export recordset to xml extension does not offer -- here are some examples:

            http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html

            However I think that creating child nodes will require you to add some sort of "inner repeat region" within the existing one that´s meant to generate the parent nodes, and that´s clearly not something that ADDT´s extension can do, so it´s IMO inevitable to handcode stuff

            -----
            Can any moderators of this forum please take a look at this post?
            -----

            It´s weekend, ya know :-)

            Cheers,
            Günter Schenk
            Adobe Community Expert, Dreamweaver
            • 3. Re: Please help, Export Recordset as XML & Schema
              Level 1
              Gunter - I've read a number of your replies on this forum (while trying desparately to find actual helpfullness to questions) and I take exception to a) your answers and b) your attitude when helping out.

              "have never seen that option in the export recordset to xml - wizard, so it assumingly doesn´t exist."

              You are the 'Adobe Community Expert, Dreamweaver' and I'm sure know these extensions well. We don't, that's why we ask the questions. We don't assume the answers. Nothing would get done if we did. And with such lousy support for this particular product, neither you nor anyone representing Adobe in these forums should answer questions on these forums with a 'well, duh!'.

              "and that´s clearly not something that ADDT´s extension can do, so it´s IMO inevitable to handcode stuff "

              Once again, don't know if it is 'clearly not something ADDT can do'. See my first point about asking questions. Not surprised about the actual 'answer' though.

              "It´s weekend, ya know"

              It wasn't the weekend when I asked and I have a sneaky suspicion that if I didn't ask again the question would have been ignored.

              Thank you for your help.
              • 4. Re: Please help, Export Recordset as XML & Schema
                Günter Schenk Level 4
                Hi Jon,

                this is a user-to-user forum, not necessarily an "expert-to-user" forum, that said, I don´t always try to answer each and every question immediately, because I want to keep this thing open to anyone else who´d like to submit a reply -- also *because* I might now have a good answer to whatever issue.

                ----
                it wasn't the weekend when I asked and I have a sneaky suspicion that if I didn't ask again the question would have been ignored
                ----

                your initial post was on Friday, May 2, and you made a follow-up one day later -- to my experience these forums are far less frequented over the weekend, and that´s all I meant to say with this.

                However, if answers don´t come within such a pretty narrow timeframe of just one day, it certainly does not mean that your answer is getting ignored at all.

                ------
                You are the 'Adobe Community Expert, Dreamweaver' and I'm sure know these extensions well. We don't, that's why we ask the questions. We don't assume the answers
                ------

                My reply "have never seen that option in the export recordset to xml - wizard..." was meant to say just that, and there´s nothing in it what was meant to imply any negative attitude towards you -- it might seem a little short, but it was just meant to be a factual statement. What else should I have said instead ?

                ------
                Once again, don't know if it is 'clearly not something ADDT can do'. See my first point about asking questions. Not surprised about the actual 'answer' though.
                ------

                when reading the export recordset to xml - specifications in the helpfile and when *not* seeing any of such options in the export recordset to xml - wizard, I just came to the conclusion *that* it´s clearly (ok, maybe I should have said: apparently) not something that´s currently supported by this behaviour. However, that´s all I can say about this

                ----
                I've read a number of your replies on this forum (while trying desparately to find actual helpfullness to questions) and I take exception to a) your answers and b) your attitude when helping out
                ----

                in general you mean ? If so, I don´t agree, as my answers are usually pretty lengthy and I´m trying to be as helpful as possible until folks get their issues resolved -- not sure that others here will even be sharing your opinion in regards to my "attitude" at all.

                Cheers,
                Günter Schenk
                Adobe Community Expert, Dreamweaver
                • 5. Re: Please help, Export Recordset as XML & Schema
                  Level 1
                  Jon,

                  Günter is the best, most consistant thing about the ADDT forums. He has no obligation to help people here. These are user to user forums. He does not represent Adobe and all his work here is on a volunteer basis. In other words its FREE!

                  Please don't expect customer service like responses from these forums...Günter's responses are direct and to the point. He does not have an "attitude" at all in his postings. Check out some other boards and watch new users get flamed for asking questions that have been asked dozens of times.

                  In my opinion he is always respectful and helpful to all...even when the answer to the question can be found with a little searching of the forums.

                  Your comments regarding his helpfullness and attitude are wrong and not appreciated. They show a lack of knowledge about these boards and Günter's contribution to them. His help and tutorials are invaluable to ADDT users around the world.

                  Please show some respect.

                  Shane