Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-05-20
1
Medium Priority
?
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 30

Accepted Solution

by:
IanTh earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
The viewer will learn how to count occurrences of each item in an array.
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 …
Suggested Courses

730 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