Page 1 of 1 1
Topic Options
#214225 - 2023-06-16 06:01 PM XML UDF
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
In Powershell I would do something like this:

 Code:
$XML = CreateObject("Microsoft.XMLDOM")
$XML.LoadXML("Insert Elements here")
$XML.Save($Filename)


This would have the effect of creating an XML instance, manipulate the xml structure and finally save the xml into a document.

However in Kixtart, I need to do something like this:

 Code:
$XML = CreateObject("Microsoft.XMLDOM")
$= $loadXml.Load($filename)
$XML.Save($Filename)


So like Powershell, I can create an XML instance and save the xml into a document. However, I need to load the xml content from a file - Kixtart doesn't seem to support the same ability as Powershell to "load" the xml from whatever I type in the section ("Insert Elements here").

Does Kixtart not have a command similar to $XML.LoadXML("Insert Elements here")

Top
#214228 - 2023-06-17 12:56 AM Re: XML UDF [Re: Robdutoit]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
It does not. There was significant work done years ago to try and create an XML library, but there was limited success. You might search the UDF library and see if any of the work done would prove useful.

Personally - I've avoided using XML, favoring either the native INI files for configurations or JSON for data exchange. I wrote a JSON parsing function in Kix, but that's part of our commercial tool set and not available publicly.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#214229 - 2023-06-17 12:01 PM Re: XML UDF [Re: Glenn Barnas]
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
Thank you for confirming this. The reason why I am asking is because I use Kixtart to create new windows Libraries (in addition to Documents, Music, Pictures and Videos). Up till now, I have always used an xml template file that I loaded and made the changes that I need - specifically in this case the url.

I will just content myself with tidying up the coding for the xml as Chatgpt has suggested a much more compact coding as my current udfs contain coding that is not necessary to achieve what I want.

I can't find the UDF library. It just displays blank pages now! If Kixtart doesn't natively support it, I am happy to continue to use a template xml file that needs to be loaded to create new Windows libraries.

Top
#214230 - 2023-06-17 04:01 PM Re: XML UDF [Re: Robdutoit]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
You can't find the UDF Library? The one that's on the main KORG web page?

Alternatively - click the Advanced button on Search, select UDF Library from the list, change the date range to 20 and search for XML.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#214231 - 2023-06-17 05:07 PM Re: XML UDF [Re: Glenn Barnas]
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
The UDF link is working today. It wasn't working yesterday. I got a message something about the UDF not being available any more as the two links no longer sorted the UDF's - or something to that effect. I am not sure why it's working when it wasn't yesterday!

Anyhow I have tidied up my xml coding, getting rid of a lot of lines of code that I never needed! I am not fussed about having to load an xml file. I just wondered if Kixtart supported xml manipulation without loading a file. Am happy to leave the coding as is as my biggest problem was the amount of coding I was using to do the job in the past.

Maybe the links were down yesterday which might explain why it's working now?

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 405 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.056 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org