public function getExtractsAsElem($dom) {
        $extractsElem = $dom->createElement('extract-metadata');
        // constraints
        foreach ($this->constraints as $constraint) {
            $constraintValElem = $dom->createElement('constraint-value');
            $constraintValElem->setAttribute('ref', $constraint);
            $extractsElem->appendChild($constraintValElem);
        }
        // qnames
        foreach ($this->qnames as $qname) {
            $qnameElem = $dom->createElement('qname');
            $qnameElem->setAttribute('elem-name', $qname->getElement());
            $qnameElem->setAttribute('elem-ns', $qname->getNs());
            if($qname->getAttribute() !== '') {
                $qnameElem->setAttribute('attr-name', $qname->getAttribute());
                $qnameElem->setAttribute('attr-ns', $qname->getAttributeNs());
            }
            $extractsElem->appendChild($qnameElem);
        }
        return $extractsElem;
    }
public function getExtractsAsElem($dom) {
        $extractsElem = $dom->createElement('extract-metadata');
        // constraints
        foreach ($this->constraints as $constraint) {
            $constraintValElem = $dom->createElement('constraint-value');
            $constraintValElem->setAttribute('ref', $constraint);
            $extractsElem->appendChild($constraintValElem);
        }
        // qnames
        foreach ($this->qnames as $qname) {
            $qnameElem = $dom->createElement('qname');
            $qnameElem->setAttribute('elem-name', $qname->getElement());
            $qnameElem->setAttribute('elem-ns', $qname->getNs());
            if($qname->getAttribute() !== '') {
                $qnameElem->setAttribute('attr-name', $qname->getAttribute());
                $qnameElem->setAttribute('attr-ns', $qname->getAttributeNs());
            }
            $extractsElem->appendChild($qnameElem);
        }
        return $extractsElem;
    }
public function getExtractsAsElem ( $ dom ) { $ extractsElem = $ dom -> createElement ( 'extract-metadata' ) ; // constraints foreach ( $ this -> constraints as $ constraint ) { $ constraintValElem = $ dom -> createElement ( 'constraint-value' ) ; $ constraintValElem -> setAttribute ( 'ref' , $ constraint ) ; $ extractsElem -> appendChild ( $ constraintValElem ) ; } // qnames foreach ( $ this -> qnames as $ qname ) { $ qnameElem = $ dom -> createElement ( 'qname' ) ; $ qnameElem -> setAttribute ( 'elem-name' , $ qname -> getElement ( ) ) ; $ qnameElem -> setAttribute ( 'elem-ns' , $ qname -> getNs ( ) ) ; if ( $ qname -> getAttribute ( ) !== '' ) { $ qnameElem -> setAttribute ( 'attr-name' , $ qname -> getAttribute ( ) ) ; $ qnameElem -> setAttribute ( 'attr-ns' , $ qname -> getAttributeNs ( ) ) ; } $ extractsElem -> appendChild ( $ qnameElem ) ; } return $ extractsElem ; }
Get the metadata extracts as a DOMElement object.

@param DOMDocument $dom The DOMDocument object in which to create the element.
Get the metadata extracts as a DOMElement object .