Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Xml.ChildContent Example #2Another Xml.UpdateChildContent example...
Use ChilkatAx-win32.pkg Procedure Test Handle hoXml Handle hoSbValue Integer i Boolean iSuccess String sTemp1 Get Create (RefClass(cComChilkatXml)) To hoXml If (Not(IsComObjectCreated(hoXml))) Begin Send CreateComObject of hoXml End Set ComTag Of hoXml To "abc" Get Create (RefClass(cComChilkatStringBuilder)) To hoSbValue If (Not(IsComObjectCreated(hoSbValue))) Begin Send CreateComObject of hoSbValue End Move 0 To i While (i < 10) Set ComI Of hoXml To i Send ComClear To hoSbValue Get ComAppendInt Of hoSbValue i To iSuccess Get ComGetAsString Of hoSbValue To sTemp1 Send ComUpdateChildContent To hoXml "xyz|test[i]" sTemp1 Move (i + 1) To i Loop Get ComGetXml Of hoXml To sTemp1 Showln sTemp1 // Output is: // <?xml version="1.0" encoding="utf-8" ?> // <abc> // <xyz> // <test>0</test> // <test>1</test> // <test>2</test> // <test>3</test> // <test>4</test> // <test>5</test> // <test>6</test> // <test>7</test> // <test>8</test> // <test>9</test> // </xyz> // </abc> End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.