• 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: NSXMLDocument question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXMLDocument question


  • Subject: Re: NSXMLDocument question
  • From: malcom <email@hidden>
  • Date: Sat, 4 Mar 2006 17:29:57 +0100

Thank you Sarah,
Ok it now works but there is a problem when XML classes try to
encapsulate an NSString. < chars will be not converted automatically
and it still remain < so the final html string does not well rendered
by WebKit.
This is a short part of my code. Is there another way to convert
automatically <? Or need I do to it with replace functions of
NSString?


NSXMLElement *node = [[NSXMLElement alloc]
initWithKind:NSXMLElementKind options: NSXMLNodePreserveAll];
               [node setName:@"TEXT"];

               // VALUE & QUOTE
               NSXMLElement *valueNode = [[NSXMLElement alloc] initWithKind:
NSXMLElementKind options:NSXMLNodePreserveAll];
               [valueNode setName: @"VALUE"];
               [valueNode setStringValue: [[_text objectAtIndex:k] getText]];

               NSXMLElement *quoteNode = [[NSXMLElement alloc] initWithKind:
NSXMLElementKind options:NSXMLNodePreserveAll];
               [quoteNode setName: @"QUOTE"];
               [quoteNode setStringValue: [NSString
stringWithFormat:@"%d", [[_text
objectAtIndex:k] state]]];

               [node addChild: valueNode];
               [node addChild: quoteNode];
               [rootText addChild: node];
 _______________________________________________
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

  • Follow-Ups:
    • Re: NSXMLDocument question
      • From: Sarah Wilkin <email@hidden>
    • Re: NSXMLDocument question
      • From: Jim Correia <email@hidden>
    • Re: NSXMLDocument question
      • From: Brett Powley <email@hidden>
    • NSArrays comparison
      • From: XTAL <email@hidden>
References: 
 >NSXMLDocument question (From: malcom <email@hidden>)
 >Re: NSXMLDocument question (From: Ilan Volow <email@hidden>)
 >Re: NSXMLDocument question (From: Robert Walker <email@hidden>)
 >Re: NSXMLDocument question (From: John Stiles <email@hidden>)
 >Re: NSXMLDocument question (From: malcom <email@hidden>)
 >Re: NSXMLDocument question (From: John Stiles <email@hidden>)
 >Re: NSXMLDocument question (From: malcom <email@hidden>)
 >Re: NSXMLDocument question (From: Sarah Wilkin <email@hidden>)

  • Prev by Date: Re: how to debug notification that's never received?
  • Next by Date: NSArrayController & Select inserted objects
  • Previous by thread: Re: NSXMLDocument question
  • Next by thread: NSArrays comparison
  • Index(es):
    • Date
    • Thread