Posted: 01.08.2005 13:44 Post subject: web preko XML-a i php-a
slab san i u jednom i drugom, ali mi treba nešto na brzinu da parsam jedan jednostavan document.
kako svrljan po tutorialima vidim da iman puno rupa pa mi skoro ni jedan ne koristi.
ma u biti muči me par stvari:
- instalacija ovog expat! jel ima ko volje i želje da mi to ukratko objasni?
- najednostavniji način parsanja da vidin jel to uopće radi
- kako postati besmrtan?
znaci 'narpavis', kreiras parser...
sljedeci korak je da mu odredis handler funkcije koje ce bit pozvane kad parser naidje na ... hm određeni 'trigger' npr. start_tag (tj. pocetak nekog elementa/node-a ili kako vec), end_tag, i char_data odnosno 'podatke', sadržaj, content :) nekog elementa....
kao sto gore vidis moje handler funkcije se zovu StartTag, EndTag i CharData...
(detalje potrazi po netu :)
evo kak trebaju biti 'deklarirane' funkcije...(necu dodatno objasnjavat, sve se vidi dolje, bar mislim :)
Code:
function StartTag($P, $TagName, &$TagAttributes)
function EndTag($P, $TagName)
function CharData($P, $Data)
obicno da bi znao o kojem se elementu/tagu/node-u radi kad ti parser 'vrati' cdata koristis neku varjablu npr. $CurrentTag ... .. ..
tu pozivas xml_parse i dajes mu komade od po 4kb....
Code:
xml_parser_free($pajser);
na kraju oslobodis parser :)
to bi bilo ukratko o parsanju...ima tu jos nekih stvari...
bilo bi dobro kad bi napiso o kakvoj se strukturi tvog xml-a radi...
ps. ako sam napiso neku glupost ili nesta :) budite slobodni da me ispravite "Sve prihvaćam stoički. S mitraljezom u ruci. Lijevoj. U desnoj je minobacač. Hvala"
_________________ Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Joined: 25 Aug 2003 Posts: 1842 Location: Zagreb, Hrvatska
Posted: 02.08.2005 15:48 Post subject: Re: web preko XML-a i php-a
moko wrote:
- kako postati besmrtan?
Treba ti essence of hakkar. I egg of hakkar.
Essence dropa u sunken temple-u, nakon sto zabijes ogromnog zmaja, a jaje moras pobrat u Jintha'aloru u pecini nakon sto ubijes keeper-a tamo.
Jaje moras napuniti essence-om i donijeti frajeru u steemwhedle port u tanarisu. Zaboravio sam kako se zove, al ne mozes ga promasit. On ti daje lifeforce dirk koji ima +11 stamina. Skoro besmrtan.
Posted: 02.08.2005 15:58 Post subject: Re: web preko XML-a i php-a
zytzagoo wrote:
Skoro besmrtan.
A police officer pulled over a red Porsche after it had run a stop sign. He walked up to the car door and sain, "Sir, May I see your driver's license and registration please?"
The driver said, "What's the problem, officer?"
"Your just ran the stop sign back there at the last intersection."
"Oh, come on pal, there wasn't a car within miles of me!"
"Nevertheless sir, you are required to come to a complete stop, look both ways, and proceed with caution."
"You gotta be kidding me!"
"It's no joke, sir".
"Look, I slowed down almost to a complete stop, saw no one within twenty miles, and proceeded with caution."
"That's beside the point, sir. You are supposed to come to a complete stop, and you didn't. Now if I may see your license and..."
"You've got a lot of time on your hands, PAL! What's the matter, all the doughnut shops closed?"
"Sir, I'll overlook that last comment. Let me see your license and registration immediately!"
"I will, if you can tell me the difference between slowing down, and coming to a complete stop."
The police officer had enough and said to the driver, "Sir, I can do better than that." He opened the car door, dragged the obnoxious driver out, and proceeded to methodically beat him over the head with his nightstick.
"Now sir, would you like me to slow down or come to a complete stop?"
Almost Doesn't Count
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum