Re: Memory Management for XML Parsing

2011-06-12 Thread Jens Alfke
On Jun 12, 2011, at 2:44 AM, Bing Li wrote: > The NSArray, nodes, is created by xmlDoc. Since the method is not the owner, > nodes should be released here. No, you don’t need to release ‘nodes' since you didn’t allocate or copy it. > When a large number of XML is received, the > receiver's memo

Memory Management for XML Parsing

2011-06-12 Thread Bing Li
Dear all, I got another memory management problem. When an XML is received, it must be parsed using the below method. When a large number of XML is received, the receiver's memory is increased slowly. I tried to figure out where the memory leaks. I guess the method might cause this problem. The N

Re: substring (or) CDATA XML PARSING?!

2009-04-10 Thread Drew Lawson
According to developers mac: > Thanks for the response david. I am already paring the xml using NSXML > parser alone. but My problem is, the CDATA is not present inside a node. I > can get & values by reading the node using XML parser. Is there > any other way? The CDATA will be a text node. A

Re: substring (or) CDATA XML PARSING?!

2009-04-10 Thread Filip van der Meeren
Do not forget to release my scanner after using it... On 10 Apr 2009, at 14:44, Filip van der Meeren wrote: Hello, Just use NSScanner (http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSScanner_Class/Reference/Reference.html ) to parse those tags. Something like t

Re: substring (or) CDATA XML PARSING?!

2009-04-10 Thread developers mac
Thanks for the response david. I am already paring the xml using NSXML parser alone. but My problem is, the CDATA is not present inside a node. I can get & values by reading the node using XML parser. Is there any other way? ___ Cocoa-dev mailing list

Re: substring (or) CDATA XML PARSING?!

2009-04-10 Thread Filip van der Meeren
Hello, Just use NSScanner (http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSScanner_Class/Reference/Reference.html ) to parse those tags. Something like this should do the job: NSString *stringBeforeHtml = nil; NSScanner *scanner = [[NSScanner alloc] initWithStr

Re: substring (or) CDATA XML PARSING?!

2009-04-10 Thread david paeme
how about using some of the NSXML components? check http://developer.apple.com/documentation/Cocoa/Conceptual/NSXML_Concepts/index.html On 10 Apr 2009, at 14:31, developers mac wrote: Hi there, I went through the various substring methods like NSString *str1 = [theResponseString substringF

substring (or) CDATA XML PARSING?!

2009-04-10 Thread developers mac
Hi there, I went through the various substring methods like NSString *str1 = [theResponseString substringFromIndex:2] NSString *pathTrimmed = [theResponseString lastPathComponent]; and also other methods from: http://developer.apple.com/documenta...cc/cl/NSString

xml parsing

2009-04-01 Thread developers mac
Hi there, I have to parse a xml & return the values for val & id (attribute). I have pasted a sample xml below. Alabama . . . Wyoming Australia . . . ZambiaI am able to retrieve the val(Alabama, Austalia...) & display it in a table view. I need to get the attribute values (AL, 1) - to k

Re: Dealing with encoding in XML parsing

2008-09-17 Thread Nathan Kinsinger
On Sep 16, 2008, at 4:01 PM, Laurent Cerveau wrote: Hi I have an XML document with obviously some problems with it but that needs to be parsed in all cases. One of the problem is apparently an encoding one as some text read in an editor as "Restaurant, Bar, Bistro, CafÈ" (reopening with a

Re: Dealing with encoding in XML parsing

2008-09-16 Thread James Walker
Laurent Cerveau wrote: I have an XML document with obviously some problems with it but that needs to be parsed in all cases. One of the problem is apparently an encoding one as some text read in an editor as "Restaurant, Bar, Bistro, CafÈ" (reopening with an ISO-8859-1 Windows apparently is

Dealing with encoding in XML parsing

2008-09-16 Thread Laurent Cerveau
Hi I have an XML document with obviously some problems with it but that needs to be parsed in all cases. One of the problem is apparently an encoding one as some text read in an editor as "Restaurant, Bar, Bistro, CafÈ" (reopening with an ISO-8859-1 Windows apparently is solving the issue

Re: Event-Driven XML Parsing and Entity References

2008-07-28 Thread Carter R. Harrison
is what I want to store). I hope this makes sense - it's terribly frustrating. As always, thanks in advance. I haven't used CFXMLParser, but generally in event xml parsing you keep adding to the string until the end of the element. Parsers may break the element up into sev

Re: Event-Driven XML Parsing and Entity References

2008-07-27 Thread Nathan Kinsinger
x27;s terribly frustrating. As always, thanks in advance. I haven't used CFXMLParser, but generally in event xml parsing you keep adding to the string until the end of the element. Parsers may break the element up into several parts and give them to you one at a time. In this cas

Re: Event-Driven XML Parsing and Entity References

2008-07-27 Thread Martijn
Hey, i am not sure but i have the feeling that the title should be "planes, trains, & automobiles" so with an extra semicolon behind the &. 2008/7/27 Carter R. Harrison <[EMAIL PROTECTED]> > There's been some discussion on this topic previously, but I haven't been > able to find the solution th

Event-Driven XML Parsing and Entity References

2008-07-27 Thread Carter R. Harrison
There's been some discussion on this topic previously, but I haven't been able to find the solution that I'm looking for. I'm using the event-driven XML parser (CFXMLParser). Apparently it does not support the replacement of entity references (&, <, >, etc..). So assume I'm trying to parse

Re: xml parsing

2008-06-13 Thread Mike
Steve Majewski wrote: 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 r

Re: xml parsing

2008-06-13 Thread Steve Majewski
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 erro

Re: xml parsing

2008-06-13 Thread Mike Manzano
Try posting some code. On Jun 13, 2008, at 1: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 bla bla imag1 http://www.blabla.com bla bla2 imag2 http://

xml parsing

2008-06-13 Thread Bart Beulen
Hi All I'm new to cocoa and working on an xml parser. I would like to parse xml files like the following example bla bla imag1 http://www.blabla.com bla bla2 imag2 http://www.blabla2.com bla bla3 imag3 http://www.blabla

Re: [iPhone] xml parsing

2008-03-10 Thread Julien Jalon
I can't comment on the iPhone part as this is NDA (and should not be discussed here) but, on Mac OS X, I'd add /usr/include/libxml2 to the header search path in project (or target) build settings. Also, I'd add the libxml2.dylib to my project using "Add existing framework" or add -lxml2 to the "add

Re: [iPhone] xml parsing

2008-03-10 Thread Jacob Bandes-Storch
On a similar-ish note, I'm having trouble using libxml. I'm using a slightly modified version of the appropriate sample code. I need to make sure that the library is in my project. Since I couldn't find the library in a convenient place (where are you supposed to get those anyway?), I just

Re: [iPhone] xml parsing

2008-03-10 Thread Julien Jalon
I'm pretty sure you read the SDK release notes ;-) If not, I think you should, that's always a good idea. -- Julien On Mon, Mar 10, 2008 at 11:49 PM, Simon Fell <[EMAIL PROTECTED]> wrote: > The iPhone docs point you in the direction of libXML2 for parsing XML, > yet the headers for NSXML are in

Re: [iPhone] xml parsing

2008-03-10 Thread Jean-Daniel Dupas
If you find a function/method/class declaration in a public header (an header that is not in PrivateHeader folder) you can problably considere it as public. Le 10 mars 08 à 23:49, Simon Fell a écrit : The iPhone docs point you in the direction of libXML2 for parsing XML, yet the headers f

[iPhone] xml parsing

2008-03-10 Thread Simon Fell
The iPhone docs point you in the direction of libXML2 for parsing XML, yet the headers for NSXML are included in the SDK headers, and i was able to build and run fine using NSXMLDoc/element/node. (in fact i just dropped my existing NSXML based code into a iPhone project and it worked fine,