Login +

Documentation

SLS_XMLToolbox::appendXMLNode

Since SillySmart 1.0

Description

Add a XML flow to a given node
public appendXMLNode ( string $xPathTag, string $content, [ int $nb ] , [ string $insertMode ] );

Parameters

  • string $xPathTag
    the node to attach
  • string $content
    the content to add
  • int $nb
    number of nodes found
  • string $insertMode
    should be inside | before | after

Return

No return.

Exemples

  •  
     
     
     $xml->appendXMLNode('//node1[0]/node2[0], 'value', 1, 'after');
     // Will produce
     
     
     value
     
  •  
     
     
     
     $xml->appendXMLNode('//node1[0]/node2, 'value', 2, 'after');
     // Will produce
     
     
     value
     
     value
     

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.