Solved

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

Posted on 2009-05-20
1
199 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now