jQWidgets Forums

jQuery UI Widgets Forums Lists ListBox XML_encode??

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    XML_encode?? Posts
  • XML_encode?? #16024

    mayurabt
    Member

    Hi,

    This below code feeds records from MySQL database in the form of Json with the use of json_encode() function.
    Is there any function to encode this in form of XML? something like XML_encode()….

    Code:
    ..
    ..
    ..
    ..
    $query = “SELECT * FROM master_data group by Region”;

    $result = mysql_query($query) or die(“SQL Error 1: ” . mysql_error());
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $ordertype[] = array(
    ‘MasterID’ => $row[‘master_Data_id’],
    ‘OrderNumber’=> $row[‘Order_Number’],
    ‘OrderType’ => $row[‘Order_Type’],
    ‘OrderSource’ => $row[‘Order_Source’],
    ‘BillToCustomer’ => $row[‘Bill_To_Customer’],
    ‘Region’ => $row[‘Region’],
    ‘LICTotalUSD’ => $row[‘License_Total_in_Constant_USD’],
    ‘CreatedDate’ => $row[‘Date_Ordered’],
    ‘BookedDate’ => $row[‘Booked_Date’]
    );
    }

    echo json_encode($ordertype);
    ?>

    XML_encode?? #16025

    Peter Stoev
    Keymaster

    Hi mayurabt,

    Unfortunately, we are not aware whether there is such PHP function.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    XML_encode?? #16027

    mayurabt
    Member

    Oh… its Sad… is there any other way the records from MySQL database be pushed in form of XML?
    In examples and demos I see only the pre-existing XML files being used as URLs to fetch details on to some controls… but there is no example showing how to get those XML files in first place? is there any? Please assist..

    XML_encode?? #16030

    Peter Stoev
    Keymaster

    Hi mayurabt,

    Here’s a link related to your scenario: http://stackoverflow.com/questions/5112282/get-mysql-database-output-via-php-to-xml

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.