Extract element from XML received in an Amazon SQS queue using PHP
Get the solution ↓↓↓I am new to AWS SQS with PHP - on the queues body message it receives XML. I want to get a specific value from the XML result message body. How do I do it?
Say this XML below
<?xml version="1.0" encoding="UTF-8"?>
<PackMan>
<Line>
<LineNumber>2</LineNumber>
<ItemCode>DP-ATX-MTREXX50-AR-4F-NE</ItemCode>
<Barcode>DP-ATX-MTREXX50-AR-4F-NE</Barcode>
<ItemDescription>Deepcool Matrexx 50 ADD RGBx4</ItemDescription>
<QuantityShipped>1</QuantityShipped>
</Line>
<PackWeight>2</PackWeight>
<PackCubic>0.02</PackCubic>
</Pack>
<JobAttribute>
<Attribute>NumTrack</Attribute>
<Value>RU00001</Value>
</JobAttribute>
</PackMan>
I want to echo the Value. How should I do it?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: a non-numeric value encountered
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.