public function partialFormat($data, $nodeName = null)
    {
        if (!$nodeName) {
            $nodeName = $this->getNodeName($data);
        }
        $data = $this->parseData($data);

        if (is_scalar($data)) {
            return "<$nodeName>" . $this->parseScalarData($data) . "</$nodeName>";
        }
        return "<$nodeName>".$this->parseNonScalarData($data, $nodeName)."</$nodeName>";
    }