src/XSD2PHP/src/com/mikebevz/xsd2php/wsdl/Wsdl_1_1.php
private function createElementWithComplexType($name, $elements)
    {
        //print_r('Create complex type '.$name."\n");
        $el = $this->dom->createElement($this->xmlSchemaPreffix.':element');
        $el->setAttribute('name', $name);
        
        $compType = $this->dom->createElement($this->xmlSchemaPreffix.':complexType');
        $seqType = $this->dom->createElement($this->xmlSchemaPreffix.':sequence');
        
        foreach ($elements as $element) {
            $seqType->appendChild($element);
        }
        
        $compType->appendChild($seqType);
        $el->appendChild($compType);
        
        return $el;
    }
private function createElementWithComplexType($name, $elements)
    {
        //print_r('Create complex type '.$name."\n");
        $el = $this->dom->createElement($this->xmlSchemaPreffix.':element');
        $el->setAttribute('name', $name);
        
        $compType = $this->dom->createElement($this->xmlSchemaPreffix.':complexType');
        $seqType = $this->dom->createElement($this->xmlSchemaPreffix.':sequence');
        
        foreach ($elements as $element) {
            $seqType->appendChild($element);
        }
        
        $compType->appendChild($seqType);
        $el->appendChild($compType);
        
        return $el;
    }
Create an element with complex type

<code>
<element name="$name">
<complexType>
<sequence>
$elements
</sequence>
</complexType>
</element>
</code>

@param string $name     Element name
@param array  $elements Array of elements to include into sequence

@return DOMElement