i have a unusual problem or maybe to me :)
i have a xml file that i need to insert xml element from a string
string - /Box/BoxTest/Test
i have a function that seperate the string out into arraylist and turn it
into string array
string array 0(array index) - "", 1 - Box, 2 - BoxTest, 3 - Test
when first search the xml file if there is no Box as objectname then insert
the xml element from a template xml file
<FacilityPage AnimationInterval="500" BackgroundColor="#FFFFFF"
BackgroundImage="" InstanceNumber="1017" RefreshInterval="10">
<BackwardReferences/>
<DetailPages AllowCreate="1" AllowDelete="1">
</DetailPages>
<FacilityItems AllowCreate="1" AllowDelete="1"/>
<GeneralProperties Attr="0" InstanceNumber="1017" IsConfigured="0"
ObjectName="GROUP" ObjectType="311" SchemaVer="1.4" TraceOptions="">
<Description/>
</GeneralProperties>
</FacilityPage>
i change the attribute of instance number and objectname and the objectname
is Box and this is an xml element inside a xml file. here is the fragment of
the xml file
<FacilityPage AnimationInterval="500" BackgroundColor="#FFFFFF"
BackgroundImage="" InstanceNumber="1094" RefreshInterval="10">
<BackwardReferences/>
<DetailPages AllowCreate="1" AllowDelete="1"/>
<FacilityItems AllowCreate="1" AllowDelete="1"/>
<GeneralProperties Attr="2" InstanceNumber="1094" IsConfigured="0"
ObjectName="HomePage" ObjectType="311" SchemaVer="1.4" TraceOptions="">
<Description><![CDATA[Index page]]></Description>
</GeneralProperties>
</FacilityPage>
<FacilityPage AnimationInterval="500" BackgroundColor="#FFFFFF"
BackgroundImage="" InstanceNumber="1096" RefreshInterval="10">
<BackwardReferences/>
<DetailPages AllowCreate="1" AllowDelete="1"/>
<FacilityItems AllowCreate="1" AllowDelete="1"/>
<GeneralProperties Attr="0" InstanceNumber="1096" IsConfigured="0"
ObjectName="Box" ObjectType="311" SchemaVer="1.4" TraceOptions="">
<Description/>
</GeneralProperties>
</FacilityPage>
the next item on the array BoxTest should go under the Box xml element
between the DetailPage tag as an xml element and so and so for.
does anyone know how to do this?
thank