i ve changed basexml.php
->
function CreateXmlHeaders( $command, $resourceType, $currentFolder,$content)
{
$url=GetUrlFromPath( $resourceType, $currentFolder );
$xml=<<<XML
<Connector command="$command" resourceType="$resourceType">
<CurrentFolder path="$currentFolder" url="$url" />
$content
</Connector>
XML;
return $xml;
}
content includes the nodes created by funcs GetFoldersAndFiles, GetFolders and CreateFolder.
connecter.php ->
SetXmlHeaders() ;
// Execute the required command.
switch ( $sCommand )
{
case 'GetFolders' :
$content=GetFolders( $sResourceType, $sCurrentFolder ) ;
break ;
case 'GetFoldersAndFiles' :
$content=GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
break ;
case 'CreateFolder' :
$content=CreateFolder( $sResourceType, $sCurrentFolder ) ;
break ;
}
echo CreateXmlHeaders( $sCommand, $sResourceType, $sCurrentFolder,$content) ;
but i ve a problem "ConvertToXmlAttribute" func causes errors when creating nodes (in content).
->
function CreateXmlHeaders( $command, $resourceType, $currentFolder,$content)
{
$url=GetUrlFromPath( $resourceType, $currentFolder );
$xml=<<<XML
<?xml version="1.0" encoding="utf-8"?>
<Connector command="$command" resourceType="$resourceType">
<CurrentFolder path="$currentFolder" url="$url" />
$content
</Connector>
XML;
return $xml;
}
content includes the nodes created by funcs GetFoldersAndFiles, GetFolders and CreateFolder.
connecter.php ->
SetXmlHeaders() ;
// Execute the required command.
switch ( $sCommand )
{
case 'GetFolders' :
$content=GetFolders( $sResourceType, $sCurrentFolder ) ;
break ;
case 'GetFoldersAndFiles' :
$content=GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
break ;
case 'CreateFolder' :
$content=CreateFolder( $sResourceType, $sCurrentFolder ) ;
break ;
}
echo CreateXmlHeaders( $sCommand, $sResourceType, $sCurrentFolder,$content) ;
but i ve a problem "ConvertToXmlAttribute" func causes errors when creating nodes (in content).
RE: XML Problem with PHP (ver. 2.2-File Brows