1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram

  5. Delphifan Magazine
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Getting error while parsing XML in XE4

Discussion in 'Delphi Help&Requests' started by rabirabi, Apr 18, 2014.

  1. rabirabi
    Online

    rabirabi Guest

    [font=Tahoma, FreeSans, Verdana, sans-serif]Greetings..[/font]
    [font=Tahoma, FreeSans, Verdana, sans-serif]I am a student and enjoy learning delphi. I came across a problem while I am trying to extract data from a [/font][font=Tahoma, FreeSans, Verdana, sans-serif]xml[/font][font=Tahoma, FreeSans, Verdana, sans-serif] file using [/font][font=Tahoma, FreeSans, Verdana, sans-serif]XML[/font][font=Tahoma, FreeSans, Verdana, sans-serif] binding in Delphi XE-4. The problem is the application throws [/font][font=Tahoma, FreeSans, Verdana, sans-serif]exception[/font][font=Tahoma, FreeSans, Verdana, sans-serif] every time. [/font]

    [font=Tahoma, FreeSans, Verdana, sans-serif]Here is my [/font][font=Tahoma, FreeSans, Verdana, sans-serif]XML[/font][font=Tahoma, FreeSans, Verdana, sans-serif]:[/font]
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <conversioncloud version="1.2">
        <status step="finished"/>
        <id>
            <![CDATA[T9Nr96Hy]]>
        </id>
        <videoid>
            <![CDATA[92590917]]>
        </videoid>
        <server>
            <![CDATA[server12]]>
        </server>
        <file>
            <![CDATA[my file ofr xmfhf.ext]]>
        </file>
        <service>
            <![CDATA[myservice]]>
        </service>
        <mediaurl>
            <![CDATA[web address here]]>
        </mediaurl>
        <downloadurl>
            <![CDATA[download url here]]>
        </downloadurl>
        <downloadserver>
            <![CDATA[srv55]]>
        </downloadserver>
        <downloadhash>
            <![CDATA[upyxqnJmsKuwbGttn5OcaXCs26SqaG60l5acbmpmm2pka7WEz9bXnaeE14ujqK2tyMg%3D]]>
        </downloadhash>
        <filesize>
            <![CDATA[2.77 MB]]>
        </filesize>
        <debuginfo>
            <![CDATA[T9Nr96Hy|92590917|srv55|1396163808|ListenToYoutube]]>
        </debuginfo>
    </conversioncloud>



    [font=Tahoma, FreeSans, Verdana, sans-serif]Error I get as [/font][font=Tahoma, FreeSans, Verdana, sans-serif]Exception[/font][font=Tahoma, FreeSans, Verdana, sans-serif]: An opening '[' character was expected Line:23[/font]



    [font=Tahoma, FreeSans, Verdana, sans-serif]Here is my code:[/font]
    Code:
    procedure TForm1.Button10Click(Sender: TObject);
    var
      Cloud : IXMLConversioncloudType;
      size : Integer;
    begin
      XMLDocument1.XML.Text := Memo1.Text;
      Cloud := Getconversioncloud(XMLDocument1);
    
    // trying to display "file" field from xml document above 
    ShowMessage(Cloud.File_);
    end;

    [font=Tahoma, FreeSans, Verdana, sans-serif]Actually I want to extract the values like mediaurl, fileurl, filesize and so on.[/font][font=Tahoma, FreeSans, Verdana, sans-serif]I need a simpler solution i.e. using [/font][font=Tahoma, FreeSans, Verdana, sans-serif]XML[/font][font=Tahoma, FreeSans, Verdana, sans-serif] Binding wizard or any other methods. Any code example or reference for such problems will be appreciated.[/font]
     

Share This Page