Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: [solved] XML import to Lianja table

  1. #11
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    335
    Quote Originally Posted by barrymavin View Post
    Hi Georg

    unbenannt1 Should be unbennant1

    Change the name of the file in the prg.
    Ok, thank you very much. Now it's ok.

    Sorry!
    Either you understand German better than I do or my eyesight is bad, or both ;-)

  2. #12
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    335
    Hi Barry,
    many thanks again!
    Your following prg is the only one helping me to create a table from an xml file.
    It should get added to a docu as an example!
    Georg

    olddate = set("DATE")
    set date german

    // drop table btest
    // if exists create table if not exists btest (datum date, vtext varchar)

    if !file("btest.dbf")
    create table btest (datum date, vtext varchar)
    endif

    use btest

    // following line brings error => "ARRAY name was expected"
    orows = xml_decode_file("unbennant1.xml", "ooo_sheet", "ooo_row")

    foreach orows as orow
    insert into btest (datum, vtext) values(ctod(orow.column_1), strconv(orow.column_2))
    endfor
    set date &olddate
    use btest
    list datum, etos(vtext)
    Remark:
    etos(vtext) doesn't show the whole vtext (only 256 char)
    Last edited by gcjm; 2025-01-20 at 03:34.

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us