The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 ViewsOkay, I'm trying to write a script that can read and edit xml.
I know that there's Python modules that I can download that will do this but I tried one and didn't like it, so I'm making my own so that I can... learn. But the problem is I don't know any pattern matching. What could I use to separate each tag, tell which tag nested inside which tag, etc?
The only things I know that are close are match() and search() and I don't think those would work. I'd need something like preg_match and preg_replace in PHP.
Also, I have a feeling that this won't exactly be easy. Is it even worth doing?
At 8/18/09 08:51 PM, bgraybr wrote: I'd need something like preg_match and preg_replace in PHP.
Does this help:
http://www.amk.ca/python/howto/regex/reg ex.html#SECTION000300000000000000000
wat
a compessor wil raise the volume while lowering the db - chronamut
At 8/18/09 09:35 PM, Thomas wrote:At 8/18/09 08:51 PM, bgraybr wrote: I'd need something like preg_match and preg_replace in PHP.Does this help:
http://www.amk.ca/python/howto/regex/reg ex.html#SECTION000300000000000000000
Actually, I think thats exactly what I'm look for.
I'll try it and see how it goes.
You want to read and edit xml. If you are familiar with php, just use simplexml. Unless you are trying to just write your own version for fun? Then no, I would not suggest doing it, as you would be reinventing the wheel.
~fourthfrench
At 8/18/09 10:07 PM, fourthfrench wrote: Unless you are trying to just write your own version for fun? Then no, I would not suggest doing it, as you would be reinventing the wheel.
There is absolutely nothing wrong with reinventing the wheel as you put it, it's a great learning experiance.