Ec (2); It's okay today. The company also wants to write a php xml parsing program. Let's take a look at it on the Internet and write it out to share it with you, let's take a look at the message page first. & lt ;? Phpinclude_once (& quot; class. php & quot;); $ HawkXMLnewMessage_XML (); $ Action $ _ GET [& quot; Action & quot;];? & Gt; & lt; html script ec (2); script
Today it's okay. The company also wants to write a php xml parsing program. After reading it online, I think it's good to write it and share it with you. Let's take a look at the message page first.
Include_once ("class. php ");
$ HawkXML = new Message_XML ();
$ Action = $ _ GET ["Action"];
?>
Php + xml message book
Php + xml message book
"> [Posting a message]"> [displaying a message] [clearing a message]
Switch ($ Action)
{
Case "show_message": // display the message
$ HawkXML-> show_message ();
Break;
Case "post_message": // Add a message to submit
$ HawkXML-> post_message ();
Break;
Case "add_message": // Add a message
$ HawkXML-> add_message ($ _ POST ['subobject'], $ _ POST ['content']);
Break;
Case "clear_message ":
$ HawkXML-> clear_message ();
Break;
Case "delete_message": // delete a message
$ AutoID = $ _ GET ['autoid'];
$ HawkXML-> delete_message ($ AutoID );
Break;
Case "edit_message": // modify the message
$ AutoID = $ _ GET ['autoid'];
$ HawkXML-> edit_message ($ AutoID );
Break;
Case "save_message": // modify message submission
$ AutoID = $ _ GET ['autoid'];
$ HawkXML-> save_message ($ AutoID, $ _ POST ['subobject'], $ _ POST ['content']);
Break;
Default: // The default message is displayed.
$ HawkXML-> show_message ();
Break;
}
?>
Finally, we can paste the xml document format.
265634001218784833 Test message 1 Test message 1 Test message 1 140627001218784843 Test message 2 Test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 test messages 2 078128001218784850 Test message 3 Test message 3 Test message 3 Test message 3 765628001218784857 Test message 4 Test messages 4 test messages 4 test messages 4 test messages 4 test messages 4 test messages 4 test messages 4 test messages 4 test messages 4 test messages 4