• 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
CFXMLParser problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFXMLParser problem


  • Subject: CFXMLParser problem
  • From: Jesus De Meyer <email@hidden>
  • Date: Fri, 30 Sep 2005 12:50:00 +0200

Hi,

I just ran into a bit of a problem with CFXMLParser. For some odd reason, when I have an entity like this: <link>http:// www.somesite.com/?p=showstuff&amp;id=123</link> the nodeValue of this entity becomes: http://www.somesite.com/?p=showstuff

The XML file is retrieved over the internet and is saved in an NSData object, which I then pass to the CFXMLParser. Is there something I'm missing?

Here's some of the code I use to read the XML file:

CFXMLTreeRef rootXMLTree, tempTree;
    CFXMLNodeRef xmlNode;

    connectionSuccessful = YES;

    if ([feedData length] == 0) return;

rootXMLTree = CFXMLTreeCreateFromData(kCFAllocatorDefault, (CFDataRef)feedData, NULL, kCFXMLParserSkipWhitespace, kCFXMLNodeCurrentVersion);

    if (rootXMLTree == nil) {
        parsedWithErrors = YES;
    } else {
        int childCount;
        int index;

        childCount = CFTreeGetChildCount(rootXMLTree);

        for (index = childCount - 1; index >= 0; index--) {
            tempTree = CFTreeGetChildAtIndex(rootXMLTree, index);
            xmlNode = CFXMLTreeGetNode(tempTree);

NSString *nodeString = (NSString*)CFXMLNodeGetString (xmlNode);

//do something with nodeString, ie check which entity it represents...


Thanks in advance _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: XML parser for objective C
  • Next by Date: Re: Getting mouseMoved event while dragging
  • Previous by thread: Re: XML parser for objective C
  • Next by thread: problems with NSOpenPanel (black rectangles)
  • Index(es):
    • Date
    • Thread