Dismiss Notice

REGISTRATION IS AFTER ADMIN ACTIVATION

DONATIONS WITH PAYPAL CLICK TO BUTTON

1 MONTH VIP - 5$; 3 MONTHS VIP - 10$; 6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$

DONATIONS WITH Bitcoin Address:3NRs3CK3fhXifrNYxHEZKpETDd9vNLMsMD

Dismiss Notice
The registration is approved by the Administrator. It takes about 1 day to approve your registration
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
    Offline

    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

Laws
Our website, law, laws, copyright and aims to be respectful of individual rights. Our site, as defined in the law of 5651 serves as a provider of space. According to the law, contrary to the law of site management has no obligation to monitor content. Therefore, our site has adopted the principle of fit and remove. Works are subject to copyright laws and is shared in a manner that violated their legal rights, or professional associations, rights holders who, adsdelphi@gmail.com I can reach us at e-mail address. Complaints considered to be infringing on the examination of the content will be removed from our site.
Donate Help To Us and Be VIP
DONATIONS WITH PAYPAL CLICK TO BUTTON
6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$
Social Block