LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-24-2007, 01:21 PM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
XML question


Hi,
say i have the following:
<tag1><tag2>txt</tag2></tag1>

I used the kXML pull parser, but the question will probably apply to other parsers too. The parser "notifies" me right of a TEXT event after <tag2>, as well as a TEXT event after <tag1>, with text being "". Is this right or is it my idea? Is it considered, that the string "" exists between the <tag1> and </tag1> tags?

Thanks
 
Old 07-01-2007, 04:27 AM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
AFAIK, there will only be an event for the text between <tag2> and </tag2>.
There is no string between <tag1> and <tag2>, and most XML parsers only generate a "found characters" event when there are actually characters. You should get an event after <tag1> to say that <tag2> is found.

--Ian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
awk question - parsing xml file epoo Programming 7 01-24-2007 02:13 PM
XML / XQuery question... Scrag Programming 1 09-24-2004 01:29 AM
XML question p-static Programming 3 08-02-2004 11:22 PM
php & xml install question benjam Linux - Newbie 2 07-08-2004 12:41 PM
C++ question: MySQL or XML? BlackT Programming 7 07-21-2003 07:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration