how to bind data with xml?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karimkhan
    New Member
    • Jan 2011
    • 54

    how to bind data with xml?

    Can be do insert, update del kind of operation on xml file?
    How to run it?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    How to run it?
    with a programme/script that can handle XML, as XML itself is just a data storage container.

    Comment

    • karimkhan
      New Member
      • Jan 2011
      • 54

      #3
      Can you please give me example, or link to it?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        sure
        Code:
        // insert a node
        var foo = document.createElement("foo");
        xml.documentElement.appendChild(foo);

        Comment

        • karimkhan
          New Member
          • Jan 2011
          • 54

          #5
          Thanks alot buddy,
          I think this is js script,
          I am not that much familiar with xml,
          What I have to do is like,
          write a script as above,
          then including it to my xml page, right?

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            What I have to do is like, write a script as above, then including it to my xml page, right?
            no. that wouldn’t do anything. XML is a data storage format, it doesn’t execute included scripts.
            every programming language needs a kind of host (interpreter compiler, application, etc.) to be run. the XML needs to be imported there.

            to use another example
            Code:
            $foo = new SimpleXMLElement("foo");
            $xml->root->addChild($foo);

            Comment

            • karimkhan
              New Member
              • Jan 2011
              • 54

              #7
              how can i run these program?

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                with the appropriate environment.

                Comment

                • karimkhan
                  New Member
                  • Jan 2011
                  • 54

                  #9
                  Please explain it...

                  Comment

                  • Dormilich
                    Recognized Expert Expert
                    • Aug 2008
                    • 8694

                    #10
                    you can’t run PHP code without the PHP interpreter.

                    Comment

                    Working...