php & xmlrpc structure question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • basement_addict@yahoo.com

    php & xmlrpc structure question

    First off I am new to xmlrpc.I am working on a project that requires me
    to return this structure.

    <?xml version="1.0"?>
    <methodResponse >
    <params>
    <param>
    <struct>
    <member>
    <name>files</name>
    <value>
    <array>
    <data>
    <value><string> file1</string></value>
    <value><string> file2</string></value>
    <value><string> file3</string></value>
    </data>
    </array>
    </value>
    </member>
    </struct>
    </param>
    </params>
    </methodResponse>


    I am using this php

    <?php
    $a=array(new XML_RPC_Value(" file1"),new XML_RPC_Value( "file2"), new
    XML_RPC_Value(" file3"));


    $struct = array (
    "files" => new XML_RPC_Value( $a, "array")
    );


    return new XML_RPC_Respons e(new XML_RPC_Value($ struct, "struct"));
    ?>


    This is the structure that gets returned:


    <methodResponse >
    <params>
    <param>
    <value>
    <struct>
    <member>
    <name>files</name>
    <value>
    <array>
    <data>
    <value><string> file1</string></value>
    <value><string> file2</string></value>
    <value><string> file3</string></value>
    </data>
    </array>
    </value>
    </member>
    </struct>
    </value>
    </param>
    </params>
    </methodResponse>


    The only difference is the <value> tag after <params><para m>

    Is there a way to create the intended xml structure.

    If anyone can help it would be very appreciated.

Working...