Gets the reward structure as an XML string as defined by the schema.

@return the XML string.
968275
public String getAsXMLString() {
        // Create a string XML representation:
        String rewardString = null;
        try {
            rewardString = SchemaHelper.serialiseObject(this.getAsReward(), Reward.class);
        } catch (JAXBException e) {
            System.out.println("Caught reward serialization exception: " + e);
        }
        return rewardString;
    }
337103
private String getNamePattern() {

        String niceName = m_typeShortName.getValue();
        if (m_typeShortName.getValue().contains("-")) {
            int maxLength = 0;
            String[] nameParts = niceName.split("-");
            for (int i = 0; i < nameParts.length; i++) {
                if (nameParts[i].length() > maxLength) {
                    maxLength = nameParts[i].length();
                    niceName = nameParts[i];
                }
            }
        }
        return niceName + "_%(number).xml";
    }
270626
public String toDOTString() {
        StringBuilder sb = new StringBuilder();

        // id [label=id: value-type <value-type-attributes>];
        // id -> child_id;
        // id -> child_id;

        sb.append(m_id).append(" [label=\"").append(m_id).append(": ").append(getPlanNodeType()).append("\" ");
        sb.append(getValueTypeDotString());
        sb.append("];\n");
        for (AbstractPlanNode node : m_inlineNodes.values()) {
            sb.append(m_id).append(" -> ").append(node.getPlanNodeId().intValue()).append(";\n");
            sb.append(node.toDOTString());
        }
        for (AbstractPlanNode node : m_children) {
           sb.append(m_id).append(" -> ").append(node.getPlanNodeId().intValue()).append(";\n");
        }

        return sb.toString();
    }
226109
public String getAsSimpleString() {
        String rewardString = "";
        for (Map.Entry<Integer, Float> entry : this.map.entrySet()) {
            Integer dimension = entry.getKey();
            Float reward_value = entry.getValue();
            if (!rewardString.isEmpty())
                rewardString += ",";
            rewardString += dimension + ":" + reward_value;
        }
        return rewardString;
    }
944831
public String getContent() {
		String content = "";
		
		NodeList list = dom.getChildNodes();
		for (int i=0;i<list.getLength();i++) {
			if (list.item(i) instanceof Text) {
				content += (list.item(i).getNodeValue());
			}
		}
		
		return content;
	}
1202436
private String getSchema() {
        if (Utils.isEmpty(m_config.schema)) {
            m_config.schema = m_config.root + m_config.app + ".xml";
        }
        File schemaFile = new File(m_config.schema);
        if (!schemaFile.exists()) {
            logErrorThrow("Schema file not found: {}", m_config.schema);
        }
        StringBuilder schemaBuffer = new StringBuilder();
        char[] charBuffer = new char[65536];
        try (FileReader reader = new FileReader(schemaFile)) {
            for (int bytesRead = reader.read(charBuffer); bytesRead > 0; bytesRead = reader.read(charBuffer)) {
                schemaBuffer.append(charBuffer, 0, bytesRead);
            }
        } catch (Exception e) {
            logErrorThrow("Cannot read schema file '{}': {}", m_config.schema, e);
        }
        return schemaBuffer.toString();
    }
1289633
protected function getXML()
    {
        $key = 'xml_' . md5($this->url); // Everybody loves md5!

        if ($this->cache->has($key)) {
            $this->xml = $this->cache->get($key);
        } else {
            $this->xml = $this->fetchXML();

            $this->xml = $this->changeLinkElements($this->xml);

            $this->cache->put($key, $this->xml, $this->cacheTime);
        }
    }
1046213
function xmlString( )
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );

        $root = $doc->createElement( "ezoption" );
        $doc->appendChild( $root );

        $name = $doc->createElement( "name" );
        $name->appendChild( $doc->createCDATASection( $this->Name ) );
        $root->appendChild( $name );

        $options = $doc->createElement( "options" );
        $root->appendChild( $options );

        foreach ( $this->Options as $option )
        {
            $optionNode = $doc->createElement( "option" );
            $optionNode->appendChild( $doc->createCDATASection( $option["value"] ) );
            $optionNode->setAttribute( "id", $option['id'] );
            $optionNode->setAttribute( 'additional_price', $option['additional_price'] );
            $options->appendChild( $optionNode );
        }

        $xml = $doc->saveXML();

        return $xml;
    }
1326352
public Reward getAsReward() {
        Reward reward = new Reward();
        for (Map.Entry<Integer, Float> entry : this.map.entrySet()) {
            Integer dimension = entry.getKey();
            Float reward_value = entry.getValue();
            Value reward_entry = new Value();
            reward_entry.setDimension(dimension);
            reward_entry.setValue(new BigDecimal(reward_value));
            reward.getValue().add(reward_entry);
        }
        return reward;
    }
520093
public Node getDOM()
    {
        Object root = m_message.getRawData();
        try {
            String packageName = (String)((TrxMessageHeader)this.getMessage().getMessageHeader()).get(SOAPMessageTransport.JIBX_PACKAGE_NAME);
            String bindingName = (String)((TrxMessageHeader)this.getMessage().getMessageHeader()).get(SOAPMessageTransport.JIBX_BINDING_NAME);
            if (bindingName == null)
            {
            	packageName = root.getClass().getName();
            	packageName = packageName.substring(0, packageName.lastIndexOf('.'));
            	((TrxMessageHeader)this.getMessage().getMessageHeader()).put(SOAPMessageTransport.JIBX_PACKAGE_NAME, packageName);
            }

            Node node = null;            
//            DocumentBuilder db = Util.getDocumentBuilder();
            Document doc = null;            
            
            IMarshallingContext mctx = JibxContexts.getJIBXContexts().getMarshaller(packageName, bindingName);
            if (mctx == null)
                return null;
            synchronized(mctx)
            {   // Since the marshaller is shared (may want to tweek this for multi-cpu implementations)
//?            	DomElementMapper domElementMapper  = new DomElementMapper();
//?            	m.marshalDocument(domElementMapper);
//?            	domElementMapper.marshal(root, m);
//?                IBindingFactory bfact = BindingDirectory.getFactory(clazz);
//?                IMarshallingContext mctx = bfact.createMarshallingContext();
                
            	String[] namespaces = JibxContexts.getJIBXContexts().get(packageName, bindingName).getFactory().getNamespaces();
                JDOMWriter jdomWriter = new JDOMWriter(namespaces);
                mctx.setXmlWriter(jdomWriter);
                mctx.marshalDocument(root);
                mctx.endDocument();
                
                org.jdom.Document jdoc = jdomWriter.getDocument();
                
                DOMOutputter dout = new DOMOutputter();
                doc = dout.output(jdoc);
            }
            node = doc.getDocumentElement();

            if (node != null)
                return node;
        } catch (JiBXException ex)   {
            ex.printStackTrace();
        } catch (java.lang.IllegalArgumentException ex)   {
            ex.printStackTrace();
        } catch (JDOMException e) {
			e.printStackTrace();
		}
        return super.getDOM();
    }
944027
public function xml()
    {
        foreach ($this->_result as $disk_items) {
            if (isset($disk_items['Name']) && (trim($disk_items['Name']) !== '')) {
                $xmlstablebit_disk = $this->xml->addChild("Disk");
                foreach ($this->stablebit_items as $item) {
                    if (isset($disk_items[$item]) && (($itemvalue=$disk_items[$item]) !== '') &&
                    (($item !== 'SerialNumber') || (defined('PSI_PLUGIN_STABLEBIT_SHOW_SERIAL') && (PSI_PLUGIN_STABLEBIT_SHOW_SERIAL === true)))) {
                        $xmlstablebit_disk ->addAttribute($item, $itemvalue);
                    }
                }
            }
        }

        return $this->xml->getSimpleXmlElement();
    }
721290
public Node getDOM()
    {
        if (m_message != null)
        {
        	BaseMessage message = m_message.getMessage();
        	return message.getDOM();
        }
        return super.getDOM();	// Null
    }
1184508
private String getStringValue(XmlNodeArray nodes) {
        StringBuilder stringBuilder = new StringBuilder();
        // If all we have is just a bunch of nodes and the user wants a string
        // we'll use a parent element called <string> to have a valid XML document
        stringBuilder.append("<string>");
        for (XmlNode node : nodes) {
            stringBuilder.append(getStringValue(node));
        }
        stringBuilder.append("</string>");
        return stringBuilder.toString();
    }
370247
protected function getXmlString()
    {
        if ($this->getTransactionReference() || $this->getCardReference()) {
            $xmlRoot = 'ccStoredDataRequestV1';
        } else {
            $xmlRoot = 'ccAuthRequestV1';
        }

        $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
                <{$xmlRoot}
                    xmlns=\"http://www.optimalpayments.com/creditcard/xmlschema/v1\"
                    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
                    xsi:schemaLocation=\"http://www.optimalpayments.com/creditcard/xmlschema/v1\" />";

        $sxml = new \SimpleXMLElement($xml);

        $merchantAccount = $sxml->addChild('merchantAccount');

        $merchantAccount->addChild('accountNum', $this->getAccountNumber());
        $merchantAccount->addChild('storeID', $this->getStoreId());
        $merchantAccount->addChild('storePwd', $this->getStorePassword());

        $sxml->addChild('merchantRefNum', $this->getCustomerId() ?: 'ref-num - ' . time());

        if ($this->getTransactionReference() || $this->getCardReference()) {
            $sxml->addChild('confirmationNumber', $this->getTransactionReference() ?: $this->getCardReference());
            $sxml->addChild('amount', $this->getAmount());
        } else {
            /** @var $card CreditCard */
            $card = $this->getCard();

            $sxml->addChild('amount', $this->getAmount());

            $cardChild = $sxml->addChild('card');

            $cardChild->addChild('cardNum', $card->getNumber());

            $cardExpiry = $cardChild->addChild('cardExpiry');
            $cardExpiry->addChild('month', $card->getExpiryDate('m'));
            $cardExpiry->addChild('year', $card->getExpiryDate('Y'));

            $cardChild->addChild('cardType', $this->translateCardType($card->getBrand()));
            $cardChild->addChild('cvdIndicator', '1');
            $cardChild->addChild('cvd', $card->getCvv());

            $billingDetails = $sxml->addChild('billingDetails');

            $billingDetails->addChild('cardPayMethod', 'WEB');
            $billingDetails->addChild('firstName', $card->getBillingFirstName());
            $billingDetails->addChild('lastName', $card->getBillingLastName());
            $billingDetails->addChild('street', $card->getBillingAddress1());
            $billingDetails->addChild('street2', $card->getBillingAddress2());
            $billingDetails->addChild('city', $card->getBillingCity());
            $billingDetails->addChild('state', $card->getBillingState());
            $billingDetails->addChild('country', $card->getBillingCountry());
            $billingDetails->addChild('zip', $card->getBillingPostcode());
            $billingDetails->addChild('phone', $card->getBillingPhone());
            $billingDetails->addChild('email', $card->getEmail());

            $shippingDetails = $sxml->addChild('shippingDetails');

            $shippingDetails->addChild('firstName', $card->getShippingFirstName());
            $shippingDetails->addChild('lastName', $card->getShippingLastName());
            $shippingDetails->addChild('street', $card->getShippingAddress1());
            $shippingDetails->addChild('street2', $card->getShippingAddress2());
            $shippingDetails->addChild('city', $card->getShippingCity());
            $shippingDetails->addChild('state', $card->getShippingState());
            $shippingDetails->addChild('country', $card->getShippingCountry());
            $shippingDetails->addChild('zip', $card->getShippingPostcode());
            $shippingDetails->addChild('phone', $card->getShippingPhone());
            $shippingDetails->addChild('email', $card->getEmail());
        }

        return $sxml->asXML();
    }
920030
def toxml(self):
        

        xmlstr = '<OnStart'

        chxmlstr = ''

        for action in self.actions:
            chxmlstr += action.toxml()

        if chxmlstr:
            xmlstr += '>' + chxmlstr + '</OnStart>'
        else:
            xmlstr += '/>'

        return xmlstr
819667
protected function getBasePaymentXML()
    {
        $xml = $this->getBaseXML();

        $payment = $xml->addChild('Payment');
        $txnList = $payment->addChild('TxnList');
        $txnList->addAttribute('count', 1); // One transaction per request supported by current API.

        $transaction = $txnList->addChild('Txn');
        $transaction->addAttribute('ID', 1); // One transaction per request supported by current API.
        $transaction->addChild('txnType', $this->txnType);
        $transaction->addChild('txnSource', 23); // Must always be 23 for SecureXML.
        $transaction->addChild('amount', $this->getAmountInteger());
        $transaction->addChild('currency', $this->getCurrency());
        $transaction->purchaseOrderNo = $this->getTransactionId();

        return $xml;
    }
1139193
function xmlString()
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );
        $root = $doc->createElement( "ezmatrix" );
        $doc->appendChild( $root );

        $name = $doc->createElement( "name", $this->Name );
        $root->appendChild( $name );

        $columnsNode = $doc->createElement( "columns" );

        $sequentalColumns = $this->Matrix['columns']['sequential'];
        $columnAmount = $this->NumColumns;
        $columnsNode->setAttribute( 'number', $columnAmount );
        $root->appendChild( $columnsNode );

        if ( $sequentalColumns != null )
        {
            for( $i = 0; $i < $columnAmount; $i++ )
            {
                $column = $sequentalColumns[$i];
                if ( $column != null && $column['identifier'] != 'col_' . ($i+1) )
                {
                    unset( $columnNode );
                    $columnNode = $doc->createElement( 'column' );
                    $columnNode->appendChild( $doc->createTextNode( $column['name'] ) );
                    $columnNode->setAttribute( 'num', $i );
                    $columnNode->setAttribute( 'id', $column['identifier'] );

                    $columnsNode->appendChild( $columnNode );
                }
            }

        }

        $rowsNode =  $doc->createElement( "rows" );
        $rowAmount = $this->NumRows;

        $rowsNode->setAttribute( 'number', $rowAmount );

        $root->appendChild( $rowsNode );

        foreach ( $this->Cells as $cell )
        {
            unset( $cellNode );
            $cellNode = $doc->createElement( 'c' );
            $cellNode->appendChild( $doc->createTextNode( $cell ) );

            $root->appendChild( $cellNode );
        }

        return $this->domString( $doc );
    }