XML manipulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Manipulating XML files with PHP is quite new thing to me, so I could need a bit help with it.
Here are the questions(and below are XML schema):
1) Is it possible to change those blocks order?
For example I move <block number="1.1.1"> below 1.1.3 and it's number gets changed from 1.1.1 > 1.1.3 and 1.1.2 > 1.1.1 and 1.1.3 > 1.1.2 I also should be able to change order of blocks with number="1.1" (for example 1.1 > 1.8 and 1.8 > 1.1) and number="1".

2) where and how should I approach?
Theoretically I think I should make a html list from the blocks and make it sortable with help of jQuery... beginning doesn't seem so difficult..but what happends then? (SimpleXML havent helped me with changing order..it helps me to change and read attributes.)


So any suggestions/ideas for completing that kind of solution are welcome.


And here is the XML (simplified)structure:

------------------
<block number="1" text="main of the all blocks">
   <block number="1.1">
       <block number="1.1.1">
           <somestuff_here text="hello"></somestuff_here>
       </block>
       <block number="1.1.2">
           <someotherstuff_here text="hello again"></someotherstuff_here>
       </block>
       <block number="1.1.3">
           ....
       </block>
   </block>
   <block number="1.2">
       ....
   </block>
</block>

------------------



Thank you for help.

Raido

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux