Solved

How can I get the name of the second element with PHP simplexml?

Posted on 2009-05-20
1
201 Views
Last Modified: 2013-12-13
How can I use simplexml or another means, to get the second element (element might not be the correct phrase).

I know e5Notification, first element will always be e5Notification

But the OrderNotification part will change depending on the type of order.

So I need to be the name OrderNotification ?

I've tried using SimplexmlElement but I can't get it.

<?xml version="1.0" encoding="UTF-8"?>
<e5Notification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xml.element5.com/2.0/notification.xsd">
<OrderNotification>
--- snip ---
</OrderNotification>
</e5Notification>

Open in new window

0
Comment
Question by:mindwarpltd
1 Comment
 
LVL 30

Accepted Solution

by:
IanTh earned 500 total points
ID: 24434888
you will need to use a loop for all the form elements in a php script
foreach ($_POST as $key => $value)
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Display Calender only  When events is scheduled in Worpdress? 1 23
paypal ipn to mysql 3 36
Insert values are dynamic 11 41
TSQL query to generate xml 4 33
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question