• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: xml parsing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xml parsing


  • Subject: Re: xml parsing
  • From: Steve Majewski <email@hidden>
  • Date: Fri, 13 Jun 2008 17:09:33 -0400


Your example is not a valid xml file. You should have only a single document root element.

You can check your test files first with xmllint.

( I don't use the Cocoa XML wrappers myself, but in SAX there are
config options for the parser that may affect what errors are reported.
Some errors may not show up unless you turn on validation. )



-- Steve Majewski / UVA Alderman Library



On Jun 13, 2008, at 4:54 PM, Bart Beulen wrote:

Hi All

I'm new to cocoa and working on an xml parser.
I would like to parse xml files like the following example

<poi>
	<description>bla bla</description>
	<image>imag1</image>
	<url>http://www.blabla.com</url>
</poi>
<poi>
	<description>bla bla2</description>
	<image>imag2</image>
	<url>http://www.blabla2.com</url>
</poi>
<poi>
	<description>bla bla3</description>
	<image>imag3</image>
	<url>http://www.blabla3.com</url>
</poi>

I came up with some code from the apple documentation (http://developer.apple.com/documentation/Cocoa/Conceptual/XMLParsing/XMLParsing.html#/ /apple_ref/doc/uid/10000186), but somehow only the first poi is processed. There are no errors or warnings in the code.

Thanks in advance!
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: xml parsing
      • From: Mike <email@hidden>
References: 
 >xml parsing (From: Bart Beulen <email@hidden>)

  • Prev by Date: Re: xml parsing
  • Next by Date: Re: When is a document moved or renamed?
  • Previous by thread: Re: xml parsing
  • Next by thread: Re: xml parsing
  • Index(es):
    • Date
    • Thread