Appending string in NSXMLNode

Posted by iSight on Stack Overflow See other posts from Stack Overflow or by iSight
Published on 2010-03-05T07:25:09Z Indexed on 2010/03/12 11:27 UTC
Read the original article Hit count: 283

Filed under:
|
|
|

Hi,

When I call the method setStringValue:mCurrentString when is encountered, the child elements which are already attached to element are detached. Can any one suggest why it is happening so.

The sample XML file goes like this:

<?xml version="1.0" encoding="UTF-8"?>
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0">
    <Page Id="123-234-345-456-567">
        <Word/>
        <Text Id="234-345-456-567-678" Left="120.789" Top="120.234657" Width="300.2390" Height="50.00">
            <Content>
                <![CDATA[<FlowDocument FontFamily="Helvetica" FontSize="24" Foreground="#FFFFFF00" TextAlignment="Left" PagePadding="5,0,5,0" AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph><Run FontFamily="Helvetica" FontSize="24" Foreground="FF00B38D" xml:lang="en-gb">This is for Testing purpose</Run></Paragraph>]]></Content>
         <Stroke Color="#FF00B300" Width="10"/>
        </Text>
  <Image Id="345-456-567-678-789" Left="200.345" Top="350.678" Width="200.00" Height="200.00">
           <Source>Bear.png</Source>
      </Image>
    </Page>  
 <Page Id="345-897-123-756-098" Left="100.90" Top="200.098" Width="200.098" Height="50.09">
  <Image Id="756-098-978-685-298" Left="12098" Top="340.87" Right="109.78" Height="100.987">
   <Source>Flower.png</Source>
  </Image>
 </Page>                  
</Test>

This is the method i am using for an NSXMLElement object:

[mCurrentElement setStringValue:mCurrentString];// mCurrentString is the string that 
obtained through delegate method. 

© Stack Overflow or respective owner

Related posts about touchxml

Related posts about xmlparser