XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).
Moderator: General Moderators
phpwalker
Forum Commoner
Posts: 81 Joined: Sun Apr 23, 2006 12:18 pm
Post
by phpwalker » Wed Jan 24, 2007 11:30 pm
I've finally create a small piece of code that will check the pattern of the raw data(plain text), and convert it into XML file type if there's no error.
However, when I wanted to convert the XML file back to the plain text, I have no clue on how to do it.
I've read some SimlpeXML and find some tutorials, there's no tutorial for a beginner like me.
Thanks if someone can guide me throughout this.
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Thu Jan 25, 2007 4:20 am
phpwalker
Forum Commoner
Posts: 81 Joined: Sun Apr 23, 2006 12:18 pm
Post
by phpwalker » Sun Feb 04, 2007 9:32 pm
Ehm, but I wanted to know how to make this
into this
What function is suitable for this?
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Sun Feb 04, 2007 9:36 pm
If you knew regex reall well, you could maybe do something like that
Although, I would personally use a DOM which is easy to traverse and reformat your code as required...
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Feb 04, 2007 9:51 pm
I'd suggest DOM over regex as well.
phpwalker
Forum Commoner
Posts: 81 Joined: Sun Apr 23, 2006 12:18 pm
Post
by phpwalker » Sun Feb 04, 2007 10:55 pm
Do you guys mean XML DOM?
What requirement do I need to use XML DOM?
Before that, I also wanted to learn regex, please give me some guidance on that to solve the above problems.
Thanks for the helps.