Login   Register  
PHP Classes
elePHPant
Icontem

I need help with this class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      XML Guestbook  >  All threads  >  I need help with this class  >  (Un) Subscribe thread alerts  
Subject:I need help with this class
Summary:I want just 1 node
Messages:2
Author:Xavier
Date:2007-10-15 23:37:26
Update:2007-10-15 23:57:57
 

  1. I need help with this class   Reply  
Picture of Xavier
Xavier
2007-10-15 23:37:26
Hi I'm try modiefied this class, for receive just 1 node ex:
xml from this class:

<?xml version="1.0"?>
<root>
<subject id="1">
<title>welcome to use</title>
<author>admin</author>
<content>welcome to use this php&amp;xml guestbook, version 1.0. This guestbook does not load domxml. so even if the host does not support domxml, this guestbook will still run well^^. Wish you use it enjoyably^^. If uou have any questions or advices, please go to http://phpjoe.512j.com or http://blog.csdn.net/mynamesucks/archive/2004/12/28/231747.aspx to submit words or send mail to mynamesucks@163.com</content>
<time>2004-12-25 22:50:10</time>
<picture>2</picture>
</subject>
</root>

what i need:

<?xml version="1.0"?>
<root>
<subject id="3" title="22222222222" author="2222222"> </subject>
<subject id="2" title="22222222222" author="2222222"> </subject>
<subject id="1" title="22222222222" author="2222222"> </subject>
</root>

  2. Re: I need help with this class   Reply  
Picture of Xavier
Xavier
2007-10-15 23:57:57 - In reply to message 1 from Xavier
Let me explain more better:

I just get almost everything done, but when i get stuck is in close the <subject>, The class have a(tracking for see what is going on) and show me this:


0Array ( [0] => Array ( [tag] => root [type] => open [level] => 1 ) [1] => Array ( [tag] => subject [type] => complete [level] => 2 [attributes] => Array ( [id] => 3 [title] => welcome to use [author] => admin ) ) [2] => Array ( [tag] => subject [type] => complete [level] => 2 [attributes] => Array ( [id] => 2 [title] => welcome to use [author] => admin ) ) [3] => Array ( [tag] => subject [type] => complete [level] => 2 [attributes] => Array ( [id] => 1 [title] => welcome to use [author] => admin ) ) [4] => Array ( [tag] => root [type] => close [level] => 1 ) )

<?xml version="1.0"?>
<root>
<subject id="3" title="welcome to use" author="admin">
</subject>
<subject id="2" title="welcome to use" author="admin">
</subject>
<subject id="1" title="welcome to use" author="admin">
</subject>
</root>

the original is like that:

2Array ( [0] => Array ( [tag] => root [type] => open [level] => 1 ) [1] => Array ( [tag] => subject [type] => open [level] => 2 [attributes] => Array ( [id] => 3 [title] => welcome to use [author] => admin ) ) [2] => Array ( [tag] => title [type] => complete [level] => 3 [value] => welcome to use ) [3] => Array ( [tag] => author [type] => complete [level] => 3 [value] => admin ) [4] => Array ( [tag] => subject [type] => close [level] => 2 ) [5] => Array ( [tag] => subject [type] => open [level] => 2 [attributes] => Array ( [id] => 2 [title] => welcome to use [author] => admin ) ) [6] => Array ( [tag] => title [type] => complete [level] => 3 [value] => welcome to use ) [7] => Array ( [tag] => author [type] => complete [level] => 3 [value] => admin ) [8] => Array ( [tag] => subject [type] => close [level] => 2 ) [9] => Array ( [tag] => subject [type] => open [level] => 2 [attributes] => Array ( [id] => 1 [title] => welcome to use [author] => admin ) ) [10] => Array ( [tag] => title [type] => complete [level] => 3 [value] => welcome to use ) [11] => Array ( [tag] => author [type] => complete [level] => 3 [value] => admin ) [12] => Array ( [tag] => subject [type] => close [level] => 2 ) [13] => Array ( [tag] => root [type] => close [level] => 1 ) )

<?xml version="1.0"?>
<root>
<subject id="3" title="welcome to use" author="admin">
<title>welcome to use</title>
<author>admin</author>
</subject>
<subject id="2" title="welcome to use" author="admin">
<title>welcome to use</title>
<author>admin</author>
</subject>
<subject id="1" title="welcome to use" author="admin">
<title>welcome to use</title>
<author>admin</author>
</subject>
</root>