Loading ...
Sorry, an error occurred while loading the content.

Re: [bang-phpug] Re: help need in XML/PHP

Expand Messages
  • Anees
    Hi Kishore thanks for ur help.. Now i need to get the details from two tables for creating one XML file.. for that first i started by defining a DOMXML object
    Message 1 of 3 , Oct 3, 2006
    • 0 Attachment
      Hi Kishore
      thanks for ur help..


      Now

      i need to get the details from two tables for creating one XML file..

      for that
      first i started by defining a DOMXML object

      $doc = domxml_new_doc('1.0');

      and i have one outertable query
      as


      $outer_table = 'main_category';
      $query = "SELECT * FROM $outer_table";
      $resouter = mysql_query($query, $mysql_connect);

      and when its first row is read
      its creating elements by

      $child = $doc->create_element($fieldname);
      $child = $outer->append_child($child);
      $value = $doc->create_text_node($fieldvalue);
      $value = $child->append_child($value);

      and

      i need to get some details from second table
      with its subcategid=maincategid

      to do this
      i need to get that particular field that alrady appended to the xml

      How i can.....

      i tried get_elements_by_id()
      but it returns only those elements that comes under it.
      Friends....
      Plz help

      "Kishore .S" <kishore_sainath@...> wrote:
      Hi Anees,

      The following warning
      Warning: domdocument( ) [function.domdocument]: Start tag expected,
      '<' not found in /home/fundookc/ public_html/ dev/extract_ xml.php on
      line 30

      means that your XML document is does not exist or you don't have
      permissions to access the file

      However, for the next fatal error, it is difficult to figure out the
      problem without looking at the code fragment.

      My guess is that since DOMDocument object could not be properly
      created (due to inaccessible XML file), the method invoked on the
      Document Object is invalid

      Or you have called a function called createElement but not a method
      of a DOMDocument Object

      I hope this clarifies
      Else, I would need to see the code fragment (if possible) to figure
      out the problem

      - Kishore

      --- In bang-phpug@yahoogroups.com, Anees <anees_muhd@...> wrote:
      >
      > dear friends
      >
      > i was trying to read the data from a table and write that info into
      a XML file
      > by using DOM object
      >
      > and i followed the steps in
      > http://www.tonymarston.net/php-mysql/dom.html
      >
      > but while executing it couldnt create a DOM object referance
      > and coz of that i am getting an error
      >
      >
      >
      > Warning: domdocument() [function.domdocument]: Start tag expected,
      '<' not found in /home/fundookc/public_html/dev/extract_xml.php on
      line 30
      >
      > Fatal error: Call to undefined function: createelement() in
      /home/fundookc/public_html/dev/extract_xml.php on line 33
      >
      >
      > friends plz help me
      >
      > if u find a better or an easy solution for creating an xml file from
      mysql databse, then plz give its details or links.
      >
      >
      >
      >
      > Love
      > Anees Muhammed
      > ___________
      >
      >
      > ---------------------------------
      > Do you Yahoo!?
      > Get on board. You're invited to try the new Yahoo! Mail.
      >
      > [Non-text portions of this message have been removed]
      >






      Love
      Anees Muhammed
      ___________


      ---------------------------------
      Do you Yahoo!?
      Get on board. You're invited to try the new Yahoo! Mail.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.