for some simple data as:
PS /home/nicholas> PS /home/nicholas> $data = @{
customer = 'something' name = 'whatever' }
PS /home/nicholas> PS /home/nicholas> ($data | ConvertTo-Xml).OuterXml <?xml version="1.0" encoding="utf-8"?><Objects><Object Type="System.Collections.Hashtable"><Property Name="Key" Type="System.String">name</Property><Property Name="Value" Type="System.String">whatever</Property><Property Name="Key" Type="System.String">customer</Property><Property Name="Value" Type="System.String">something</Property></Object></Objects> PS /home/nicholas>
what would be some different ways of importing this data into BaseX? Certainly, the above XML can simply be written to a file, but what might something, from within powershell, a bit more automated?
thanks,
Nick
On 18.11.2020 01:47, Nicholas wrote:
for some simple data as:
PS /home/nicholas> PS /home/nicholas> $data = @{
customer = 'something' name = 'whatever' }
PS /home/nicholas> PS /home/nicholas> ($data | ConvertTo-Xml).OuterXml
<?xml version="1.0" encoding="utf-8"?><Objects><Object
Type="System.Collections.Hashtable"><Property Name="Key" Type="System.String">name</Property><Property Name="Value" Type="System.String">whatever</Property><Property Name="Key" Type="System.String">customer</Property><Property Name="Value" Type="System.String">something</Property></Object></Objects> PS /home/nicholas>
what would be some different ways of importing this data into BaseX? Certainly, the above XML can simply be written to a file, but what might something, from within powershell, a bit more automated?
Well, Powershell is .NET based so the BaseX .NET/C# client https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/c%23/BaseXCl... could be used.
basex-talk@mailman.uni-konstanz.de