Parses the XML from the legacy database.

Returns only the data required by the FieldType, nothing more.

@param string $xml

@return array
11648
protected function parseLegacyXml($xml)
    {
        $extractedData = array();

        $dom = new \DOMDocument();
        $dom->loadXml($xml);

        $ezimageTag = $dom->documentElement;

        if (!$ezimageTag->hasAttribute('url')) {
            throw new \RuntimeException('Missing attribute "url" in <ezimage/> tag.');
        }

        if (($legacyUrl = $ezimageTag->getAttribute('url')) === '') {
            // Detected XML considered "empty" by the legacy storage
            return null;
        }

        $url = $this->urlRedecorator->redecorateFromTarget($legacyUrl);
        $extractedData['id'] = $this->imageIoService->loadBinaryFileByUri($url)->id;

        if (!$ezimageTag->hasAttribute('filename')) {
            throw new \RuntimeException('Missing attribute "filename" in <ezimage/> tag.');
        }
        $extractedData['fileName'] = $ezimageTag->getAttribute('filename');
        $extractedData['width'] = $ezimageTag->getAttribute('width');
        $extractedData['height'] = $ezimageTag->getAttribute('height');
        $extractedData['mime'] = $ezimageTag->getAttribute('mime_type');

        if (!$ezimageTag->hasAttribute('alternative_text')) {
            throw new \RuntimeException('Missing attribute "alternative_text" in <ezimage/> tag.');
        }
        $extractedData['alternativeText'] = $ezimageTag->getAttribute('alternative_text');

        return $extractedData;
    }
977408
protected function parseXML($xml){
        if (!$xml){
            return false;
        }
        $xmlP = $xml->ListParticipations;
        $xmlM = $xml->ListMarketplaces;
        
        foreach($xmlP->children() as $x){
            $this->participationList[$this->indexP]['MarketplaceId'] = (string)$x->MarketplaceId;
            $this->participationList[$this->indexP]['SellerId'] = (string)$x->SellerId;
            $this->participationList[$this->indexP]['Suspended'] = (string)$x->HasSellerSuspendedListings;
            $this->indexP++;
        }
        
        
        foreach($xmlM->children() as $x){
            $this->marketplaceList[$this->indexM]['MarketplaceId'] = (string)$x->MarketplaceId;
            $this->marketplaceList[$this->indexM]['Name'] = (string)$x->Name;
            $this->marketplaceList[$this->indexM]['Country'] = (string)$x->DefaultCountryCode;
            $this->marketplaceList[$this->indexM]['Currency'] = (string)$x->DefaultCurrencyCode;
            $this->marketplaceList[$this->indexM]['Language'] = (string)$x->DefaultLanguageCode;
            $this->marketplaceList[$this->indexM]['Domain'] = (string)$x->DomainName;
            $this->indexM++;
        }
    }
361610
protected function parseXML($xml){
        if (!$xml){
            return false;
        }
        foreach($xml->children() as $key=>$x){
            if ($key == 'Count'){
                $this->count = (string)$x;
            }
            if ($key != 'ReportSchedule'){
                continue;
            }
            $i = $this->index;
            
            $this->scheduleList[$i]['ReportType'] = (string)$x->ReportType;
            $this->scheduleList[$i]['Schedule'] = (string)$x->Schedule;
            $this->scheduleList[$i]['ScheduledDate'] = (string)$x->ScheduledDate;
            
            $this->index++;
        }
    }
638238
public static function xmlArray($xml)
    {
        $dom = simplexml_load_file($xml);
        $json_encode = json_encode($dom);
        $json_decode = json_decode($json_encode, true);

        return $json_decode;
    }
305818
public function parse( $xml )
	{
		$this->tree		= $this->parser->parse( $xml );
		$this->outlines	= array();
		$this->headers->clearOptions();

		foreach( $this->parser->getOptions() as $key => $value )
			$this->headers->setOption( "xml_".$key, $value );
		if( $version = $this->tree->getAttribute( "version" ) )
			$this->headers->setOption( "opml_version", $version );

		foreach( $this->tree->getChildren() as $area )
		{
			$areaName	= $area->getNodeName();
			switch( $areaName )
			{
				case "head":
					$children = $area->getChildren();
					foreach( $children as $nr => $child )
					{
						$childName	= $child->getNodeName();
						$content	= $child->getContent();
						switch( $childName )
						{
							case 'dateCreated':
								$content	= $this->getDate( $content );
								break;
							case 'dateModified':
								$content	= $this->getDate( $content );
								break;
							default:
								break;
						}
						$this->headers->setOption( "opml_".$childName, $content );
					}
					break;
				case "body":
					$this->parseOutlines( $area, $this->outlines );
					break;
				default:
					break;
			}
		}
	}
57552
public function to_array($xml){
        //禁止引用外部xml实体
        libxml_disable_entity_loader(true);
        $result= json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
        return $result;
    }
687284
protected function parseXML($xml){
        if (!$xml){
            return false;
        }
        foreach($xml->Orders->children() as $key => $order){
            if ($key != 'Order'){
                break;
            }
            $this->orderList[$this->index] = new AmazonOrder($this->storeName,null,$order,$this->mockMode,$this->mockFiles,$this->config);
            $this->orderList[$this->index]->mockIndex = $this->mockIndex;
            $this->index++;
        }
    }
1097116
static public function xmlToArray($xml)
    {
        //禁止引用外部xml实体
        libxml_disable_entity_loader(true);
        $values = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
        return $values;
    }
739565
protected function getArrayForSpecialCase($xml)
    {
        $regEx            = '#\s*(&lt;\?xml.*interface&gt;)\s*#is';
        $regExReplace     = '#\s*>\s*(&lt;\?xml.*interface&gt;)\s*<[^>]+>\s*#is';
        $regExReplaceWith = '/>';

        // what can happen is that the valid XML element suddenly has,
        // as its element content, a full version of url-encoded XML.
        if ( ! preg_match($regEx, $xml)) {
            return [0 => $xml];
        }
        $xml = preg_replace($regExReplace, $regExReplaceWith, $xml);

        return $this->parse($xml);
    }
204894
public static function toXml($xml)
    {
        if ($xml instanceof XmlBuilder) {
            return $xml->getDom();
        }
        if ($xml instanceof \DOMDocument) {
            return $xml;
        }
        $dom = new \DOMDocument();
        $dom->preserveWhiteSpace = false;
        if ($xml instanceof \DOMNode) {
            $xml = $dom->importNode($xml, true);
            $dom->appendChild($xml);
            return $dom;
        }

        if (is_array($xml)) {
            return self::arrayToXml($dom, $dom, $xml);
        }
        if (!empty($xml)) {
            $dom->loadXML($xml);
        }
        return $dom;
    }
202125
public function parseXML($xml)
    {
        $document = new \DOMDocument();

        $previousValue = libxml_use_internal_errors(true);
        libxml_clear_errors();
        $result = $document->loadXML($xml);
        /** @var \libXMLError[] $errors */
        $errors = libxml_get_errors();
        libxml_clear_errors();
        libxml_use_internal_errors($previousValue);

        if (true !== $result) {
            $message = [];
            foreach ($errors as $error) {
                $message[] = sprintf(
                    '%d. [%s] %s in on line %d in position %d',
                    count($message) + 1,
                    $error->code,
                    str_replace(["\n", "\r"], '', $error->message),
                    $error->line,
                    $error->column
                );
            }
            throw new RuntimeException('Can not parse XML: ' . implode('; ', $message));
        }

        return $this->parseDocument($document);
    }
572925
public static function parseXMLToArray($xml)
    {
        if (empty($xml))
            return false;

        $data = array();
        $data[$xml['Stage']->getName()] = $xml['Stage']->__toString();
        foreach ($xml as $element) {
            if ($element->children()) {
                foreach ($element as $child) {
                    if ($child->attributes()) {
                        foreach ($child->attributes() as $key => $value) {
                            $data[$element->getName()][$child->getName()][$key] = $value->__toString();
                        }
                    } else {
                        $data[$element->getName()][$child->getName()] = $child->__toString();
                    }
                }
            } else {
                $data[$element->getName()] = $element->__toString();
            }
        }

        $data = json_encode($data);
        if(JsonValidator::validate($data))
            return $data;

        return false;
    }
1164724
protected static function xmlToArray(\SimpleXMLElement $xml)/*# : array */
    {
        $arr = array();
        foreach ($xml as $element) {
            $tag = $element->getName();
            $ele = get_object_vars($element);
            if (!empty($ele)) {
                $arr[$tag] = $element instanceof \SimpleXMLElement ?
                    static::xmlToArray($element) :
                    $ele;
            } else {
                $arr[$tag] = trim($element);
            }
        }
        return $arr;
    }
549276
public static function parse($xml)
	{
		$xml = simplexml_load_string($xml);

		$gpx = new GpxFile();

		// Parse creator
		$gpx->creator = isset($xml['creator']) ? (string)$xml['creator'] : null;

		// Parse metadata
		$gpx->metadata = isset($xml->metadata) ? MetadataParser::parse($xml->metadata) : null;

		// Parse waypoints
		$gpx->waypoints = isset($xml->wpt) ? WaypointParser::parse($xml->wpt) : [];

		// Parse tracks
		$gpx->tracks = isset($xml->trk) ? TrackParser::parse($xml->trk) : [];

		// Parse routes
		$gpx->routes = isset($xml->rte) ? RouteParser::parse($xml->rte) : [];

		return $gpx;
	}
1103353
protected function parseXml($xml) {
        if (!$xml) {
            return false;
        }
        if (isset($xml->ShipmentEventList)) {
            foreach($xml->ShipmentEventList->children() as $x) {
                $this->list['Shipment'][] = $this->parseShipmentEvent($x);
            }
        }
        if (isset($xml->RefundEventList)) {
            foreach($xml->RefundEventList->children() as $x) {
                $this->list['Refund'][] = $this->parseShipmentEvent($x);
            }
        }
        if (isset($xml->GuaranteeClaimEventList)) {
            foreach($xml->GuaranteeClaimEventList->children() as $x) {
                $this->list['GuaranteeClaim'][] = $this->parseShipmentEvent($x);
            }
        }
        if (isset($xml->ChargebackEventList)) {
            foreach($xml->ChargebackEventList->children() as $x) {
                $this->list['Chargeback'][] = $this->parseShipmentEvent($x);
            }
        }
        if (isset($xml->PayWithAmazonEventList)) {
            foreach($xml->PayWithAmazonEventList->children() as $x) {
                $temp = array();
                $temp['SellerOrderId'] = (string)$x->SellerOrderId;
                $temp['TransactionPostedDate'] = (string)$x->TransactionPostedDate;
                $temp['BusinessObjectType'] = (string)$x->BusinessObjectType;
                $temp['SalesChannel'] = (string)$x->SalesChannel;
                $temp['Charge'] = $this->parseCharge($x->Charge);
                if (isset($x->FeeList)) {
                    foreach($x->FeeList->children() as $z) {
                        $temp['FeeList'][] = $this->parseFee($z);
                    }
                }
                $temp['PaymentAmountType'] = (string)$x->PaymentAmountType;
                $temp['AmountDescription'] = (string)$x->AmountDescription;
                $temp['FulfillmentChannel'] = (string)$x->FulfillmentChannel;
                $temp['StoreName'] = (string)$x->StoreName;
                $this->list['PayWithAmazon'][] = $temp;
            }
        }
        if (isset($xml->ServiceProviderCreditEventList)) {
            foreach($xml->ServiceProviderCreditEventList->children() as $x) {
                $temp = array();
                $temp['ProviderTransactionType'] = (string)$x->ProviderTransactionType;
                $temp['SellerOrderId'] = (string)$x->SellerOrderId;
                $temp['MarketplaceId'] = (string)$x->MarketplaceId;
                $temp['MarketplaceCountryCode'] = (string)$x->MarketplaceCountryCode;
                $temp['SellerId'] = (string)$x->SellerId;
                $temp['SellerStoreName'] = (string)$x->SellerStoreName;
                $temp['ProviderId'] = (string)$x->ProviderId;
                $temp['ProviderStoreName'] = (string)$x->ProviderStoreName;
                $this->list['ServiceProviderCredit'][] = $temp;
            }
        }
        if (isset($xml->RetrochargeEventList)) {
            foreach($xml->RetrochargeEventList->children() as $x) {
                $temp = array();
                $temp['RetrochargeEventType'] = (string)$x->RetrochargeEventType;
                $temp['AmazonOrderId'] = (string)$x->AmazonOrderId;
                $temp['PostedDate'] = (string)$x->PostedDate;
                $temp['BaseTax']['Amount'] = (string)$x->BaseTax->CurrencyAmount;
                $temp['BaseTax']['CurrencyCode'] = (string)$x->BaseTax->CurrencyCode;
                $temp['ShippingTax']['Amount'] = (string)$x->ShippingTax->CurrencyAmount;
                $temp['ShippingTax']['CurrencyCode'] = (string)$x->ShippingTax->CurrencyCode;
                $temp['MarketplaceName'] = (string)$x->MarketplaceName;
                $this->list['Retrocharge'][] = $temp;
            }
        }
        if (isset($xml->RentalTransactionEventList)) {
            foreach($xml->RentalTransactionEventList->children() as $x) {
                $temp = array();
                $temp['AmazonOrderId'] = (string)$x->AmazonOrderId;
                $temp['RentalEventType'] = (string)$x->RentalEventType;
                $temp['ExtensionLength'] = (string)$x->ExtensionLength;
                $temp['PostedDate'] = (string)$x->PostedDate;
                if (isset($x->RentalChargeList)) {
                    foreach($x->RentalChargeList->children() as $z) {
                        $temp['RentalChargeList'][] = $this->parseCharge($z);
                    }
                }
                if (isset($x->RentalFeeList)) {
                    foreach($x->RentalFeeList->children() as $z) {
                        $temp['RentalFeeList'][] = $this->parseFee($z);
                    }
                }
                $temp['MarketplaceName'] = (string)$x->MarketplaceName;
                if (isset($x->RentalInitialValue)) {
                    $temp['RentalInitialValue']['Amount'] = (string)$x->RentalInitialValue->CurrencyAmount;
                    $temp['RentalInitialValue']['CurrencyCode'] = (string)$x->RentalInitialValue->CurrencyCode;
                }
                if (isset($x->RentalReimbursement)) {
                    $temp['RentalReimbursement']['Amount'] = (string)$x->RentalReimbursement->CurrencyAmount;
                    $temp['RentalReimbursement']['CurrencyCode'] = (string)$x->RentalReimbursement->CurrencyCode;
                }
                $this->list['RentalTransaction'][] = $temp;
            }
        }
        if (isset($xml->PerformanceBondRefundEventList)) {
            foreach($xml->PerformanceBondRefundEventList->children() as $x) {
                $temp = array();
                $temp['MarketplaceCountryCode'] = (string)$x->MarketplaceCountryCode;
                $temp['Amount'] = (string)$x->Amount->CurrencyAmount;
                $temp['CurrencyCode'] = (string)$x->Amount->CurrencyCode;
                if (isset($x->ProductGroupList)) {
                    foreach($x->ProductGroupList->children() as $z) {
                        $temp['ProductGroupList'][] = (string)$z;
                    }
                }
                $this->list['PerformanceBondRefund'][] = $temp;
            }
        }
        if (isset($xml->ServiceFeeEventList)) {
            foreach($xml->ServiceFeeEventList->children() as $x) {
                $temp = array();
                $temp['AmazonOrderId'] = (string)$x->AmazonOrderId;
                $temp['FeeReason'] = (string)$x->FeeReason;
                if (isset($x->FeeList)) {
                    foreach($x->FeeList->children() as $z) {
                        $temp['FeeList'][] = $this->parseFee($z);
                    }
                }
                $temp['SellerSKU'] = (string)$x->SellerSKU;
                $temp['FnSKU'] = (string)$x->FnSKU;
                $temp['FeeDescription'] = (string)$x->FeeDescription;
                $temp['ASIN'] = (string)$x->ASIN;
                $this->list['ServiceFee'][] = $temp;
            }
        }
        if (isset($xml->DebtRecoveryEventList)) {
            foreach($xml->DebtRecoveryEventList->children() as $x) {
                $temp = array();
                $temp['DebtRecoveryType'] = (string)$x->DebtRecoveryType;
                $temp['RecoveryAmount']['Amount'] = (string)$x->RecoveryAmount->CurrencyAmount;
                $temp['RecoveryAmount']['CurrencyCode'] = (string)$x->RecoveryAmount->CurrencyCode;
                $temp['OverPaymentCredit']['Amount'] = (string)$x->OverPaymentCredit->CurrencyAmount;
                $temp['OverPaymentCredit']['CurrencyCode'] = (string)$x->OverPaymentCredit->CurrencyCode;
                if (isset($x->DebtRecoveryItemList)) {
                    foreach($x->DebtRecoveryItemList->children() as $z) {
                        $ztemp = array();
                        $ztemp['RecoveryAmount']['Amount'] = (string)$z->RecoveryAmount->CurrencyAmount;
                        $ztemp['RecoveryAmount']['CurrencyCode'] = (string)$z->RecoveryAmount->CurrencyCode;
                        $ztemp['OriginalAmount']['Amount'] = (string)$z->OriginalAmount->CurrencyAmount;
                        $ztemp['OriginalAmount']['CurrencyCode'] = (string)$z->OriginalAmount->CurrencyCode;
                        $ztemp['GroupBeginDate'] = (string)$z->GroupBeginDate;
                        $ztemp['GroupEndDate'] = (string)$z->GroupEndDate;
                        $temp['DebtRecoveryItemList'][] = $ztemp;
                    }
                }
                if (isset($x->ChargeInstrumentList)) {
                    foreach($x->ChargeInstrumentList->children() as $z) {
                        $ztemp = array();
                        $ztemp['Description'] = (string)$z->Description;
                        $ztemp['Tail'] = (string)$z->Tail;
                        $ztemp['Amount'] = (string)$z->Amount->CurrencyAmount;
                        $ztemp['CurrencyCode'] = (string)$z->Amount->CurrencyCode;
                        $temp['ChargeInstrumentList'][] = $ztemp;
                    }
                }
                $this->list['DebtRecovery'][] = $temp;
            }
        }
        if (isset($xml->LoanServicingEventList)) {
            foreach($xml->LoanServicingEventList->children() as $x) {
                $temp = array();
                $temp['Amount'] = (string)$x->LoanAmount->CurrencyAmount;
                $temp['CurrencyCode'] = (string)$x->LoanAmount->CurrencyCode;
                $temp['SourceBusinessEventType'] = (string)$x->SourceBusinessEventType;
                $this->list['LoanServicing'][] = $temp;
            }
        }
        if (isset($xml->AdjustmentEventList)) {
            foreach($xml->AdjustmentEventList->children() as $x) {
                $temp = array();
                $temp['AdjustmentType'] = (string)$x->AdjustmentType;
                $temp['Amount'] = (string)$x->AdjustmentAmount->CurrencyAmount;
                $temp['CurrencyCode'] = (string)$x->AdjustmentAmount->CurrencyCode;
                if (isset($x->AdjustmentItemList)) {
                    foreach($x->AdjustmentItemList->children() as $z) {
                        $ztemp = array();
                        $ztemp['Quantity'] = (string)$z->Quantity;
                        $ztemp['PerUnitAmount']['Amount'] = (string)$z->PerUnitAmount->CurrencyAmount;
                        $ztemp['PerUnitAmount']['CurrencyCode'] = (string)$z->PerUnitAmount->CurrencyCode;
                        $ztemp['TotalAmount']['Amount'] = (string)$z->TotalAmount->CurrencyAmount;
                        $ztemp['TotalAmount']['CurrencyCode'] = (string)$z->TotalAmount->CurrencyCode;
                        $ztemp['SellerSKU'] = (string)$z->SellerSKU;
                        $ztemp['FnSKU'] = (string)$z->FnSKU;
                        $ztemp['ProductDescription'] = (string)$z->ProductDescription;
                        $ztemp['ASIN'] = (string)$z->ASIN;
                        $temp['AdjustmentItemList'][] = $ztemp;
                    }
                }
                $this->list['Adjustment'][] = $temp;
            }
        }
        if (isset($xml->SAFETReimbursementEventList)) {
            foreach($xml->SAFETReimbursementEventList->children() as $x) {
                $temp = array();
                $temp['PostedDate'] = (string)$x->PostedDate;
                $temp['SAFETClaimId'] = (string)$x->SAFETClaimId;
                $temp['Amount'] = (string)$x->ReimbursedAmount->CurrencyAmount;
                $temp['CurrencyCode'] = (string)$x->ReimbursedAmount->CurrencyCode;
                $temp['SAFETReimbursementItemList'] = array();
                if (isset($x->SAFETReimbursementItemList)) {
                    foreach($x->SAFETReimbursementItemList->children() as $y) {
                        if (!isset($y->ItemChargeList)) {
                            continue;
                        }
                        $ztemp = array();
                        foreach($y->ItemChargeList->children() as $z) {
                            $ztemp['ItemChargeList'][] = $this->parseCharge($z);
                        }
                        $temp['SAFETReimbursementItemList'][] = $ztemp;
                    }
                }
                $this->list['SAFET'][] = $temp;
            }
        }
    }
400864
private function parseElementAttributes(DOMElement $xml)
    {
        $attrs        = [];
        $elementAttrs = $xml->xpath('./@*');

        if (0 === $elementAttrs->length) {
            return $attrs;
        }

        foreach ($elementAttrs as $key => $attribute) {
            $value = static::getPhpValue($attribute->nodeValue, null, $this);
            $name = $this->normalizeKey($attribute->nodeName);
            $attrs[$this->prefixKey($name, $attribute->prefix ?: null)] = $value;
        }

        return [$this->getAttributesKey() => $attrs];
    }
473723
protected function parseXML($xml){
        $this->serviceList = array();
        $this->downList = array();
        $this->termsList = array();
        if (!$xml){
            return false;
        }
        if (isset($xml->ShippingServiceList)) {
            $i = 0;
            foreach($xml->ShippingServiceList->children() as $key=>$x){
                if ($key != 'ShippingService'){
                    break;
                }

                $this->serviceList[$i]['ShippingServiceName'] = (string)$x->ShippingServiceName;
                $this->serviceList[$i]['CarrierName'] = (string)$x->CarrierName;
                $this->serviceList[$i]['ShippingServiceId'] = (string)$x->ShippingServiceId;
                $this->serviceList[$i]['ShippingServiceOfferId'] = (string)$x->ShippingServiceOfferId;
                $this->serviceList[$i]['ShipDate'] = (string)$x->ShipDate;
                if (isset($x->EarliestEstimatedDeliveryDate)) {
                    $this->serviceList[$i]['EarliestEstimatedDeliveryDate'] = (string)$x->EarliestEstimatedDeliveryDate;
                }
                if (isset($x->LatestEstimatedDeliveryDate)) {
                    $this->serviceList[$i]['LatestEstimatedDeliveryDate'] = (string)$x->LatestEstimatedDeliveryDate;
                }
                $this->serviceList[$i]['Rate']['Amount'] = (string)$x->Rate->Amount;
                $this->serviceList[$i]['Rate']['CurrencyCode'] = (string)$x->Rate->CurrencyCode;
                $this->serviceList[$i]['ShippingServiceOptions']['DeliveryExperience'] = (string)$x->ShippingServiceOptions->DeliveryExperience;
                $this->serviceList[$i]['ShippingServiceOptions']['CarrierWillPickUp'] = (string)$x->ShippingServiceOptions->CarrierWillPickUp;
                if (isset($x->ShippingServiceOptions->DeclaredValue)) {
                    $this->serviceList[$i]['ShippingServiceOptions']['DeclaredValue']['Amount'] = (string)$x->ShippingServiceOptions->DeclaredValue->Amount;
                    $this->serviceList[$i]['ShippingServiceOptions']['DeclaredValue']['CurrencyCode'] = (string)$x->ShippingServiceOptions->DeclaredValue->CurrencyCode;
                }
                if (isset($x->AvailableLabelFormats)) {
                    foreach ($x->AvailableLabelFormats as $z) {
                        $this->serviceList[$i]['AvailableLabelFormats'][] = (string)$z;
                    }
                }

                $i++;
            }
        }
        if (isset($xml->TemporarilyUnavailableCarrierList)) {
            $i = 0;
            foreach($xml->TemporarilyUnavailableCarrierList->children() as $key=>$x){
                if ($key != 'TemporarilyUnavailableCarrier'){
                    break;
                }

                $this->downList[$i] = (string)$x->CarrierName;
                $i++;
            }
        }
        if (isset($xml->TermsAndConditionsNotAcceptedCarrierList)) {
            $i = 0;
            foreach($xml->TermsAndConditionsNotAcceptedCarrierList->children() as $key=>$x){
                if ($key != 'TermsAndConditionsNotAcceptedCarrier'){
                    break;
                }

                $this->termsList[$i] = (string)$x->CarrierName;
                $i++;
            }
        }
    }