Value empty when parsing XML Data Binding Wizard

Lilyehh

New Member
I have parsed the PNAgent.dtd file from the Citrix Web Interface with the XML Databinding Wizard in Delphi 2010, this is the resulting unit.Then I try to read the following XML with it:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE PNAgent_Configuration SYSTEM "PNAgent.dtd"[]><PNAgent_Configuration xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"> <FolderDisplay> <StartMenuDisplay> <Enabled>true</Enabled> <RootFolder root="programs"> </RootFolder> </StartMenuDisplay> <DesktopDisplay> <Enabled>false</Enabled> <Icon> <Name> </Name> </Icon> </DesktopDisplay> <SystemTrayMenuDisplay> <Enabled>true</Enabled> </SystemTrayMenuDisplay> </FolderDisplay> <DesktopIntegration> <StartMenu>add</StartMenu> <Desktop>add</Desktop> </DesktopIntegration> <ConfigurationFile> <Location modifiable="true" forcedefault="false" replaceServerLocation="true" RedirectNow="false">http://2003xa/Citrix/PNAgent/config.xml</Location> <Refresh> <OnApplicationStart>false</OnApplicationStart> <OnResourceRequest>false</OnResourceRequest> <Poll> <Enabled>false</Enabled> <Period>8</Period> </Poll> </Refresh> </ConfigurationFile> <Request> <Enumeration> <Location replaceServerLocation="true" modifiable="true" forcedefault="false" RedirectNow="false">http://2003xa/Citrix/PNAgent/enum.aspx</Location> <Smartcard_Location replaceServerLocation="true">https://2003xa/Citrix/PNAgent/smartcard_enum.aspx</Smartcard_Location> <Integrated_Location replaceServerLocation="true">http://2003xa/Citrix/PNAgent/integrated_enum.aspx</Integrated_Location> <Refresh> <OnApplicationStart modifiable="false" forcedefault="true">true</OnApplicationStart> <OnResourceRequest modifiable="false" forcedefault="true">false</OnResourceRequest> <Poll modifiable="false" forcedefault="true"> <Enabled>true</Enabled> <Period>6</Period> </Poll> </Refresh> </Enumeration> <Resource> <Location replaceServerLocation="true" modifiable="true" forcedefault="false" RedirectNow="false">http://2003xa/Citrix/PNAgent/launch.aspx</Location> <Smartcard_Location replaceServerLocation="true">https://2003xa/Citrix/PNAgent/smartcard_launch.aspx</Smartcard_Location> <Integrated_Location replaceServerLocation="true">http://2003xa/Citrix/PNAgent/integrated_launch.aspx</Integrated_Location> </Resource> <Reconnect> <Location replaceServerLocation="true" modifiable="true" forcedefault="false" RedirectNow="false">http://2003xa/Citrix/PNAgent/reconnect.aspx</Location> <Smartcard_Location replaceServerLocation="true">https://2003xa/Citrix/PNAgent/smartcard_reconnect.aspx</Smartcard_Location> <Integrated_Location replaceServerLocation="true">http://2003xa/Citrix/PNAgent/integrated_reconnect.aspx</Integrated_Location> </Reconnect> <Change_Password> <Location replaceServerLocation="true" modifiable="true" forcedefault="false" RedirectNow="false">http://2003xa/Citrix/PNAgent/change_password.aspx</Location> </Change_Password> <MachineControl> <Location replaceServerLocation="true">http://2003xa/Citrix/PNAgent/desktopControl.aspx</Location> <Smartcard_Location replaceServerLocation="true">https://2003xa/Citrix/PNAgent/smartcard_desktopControl.aspx</Smartcard_Location> <Integrated_Location replaceServerLocation="true">http://2003xa/Citrix/PNAgent/integrated_desktopControl.aspx</Integrated_Location> </MachineControl> </Request> <Failover> </Failover> <Logon> <LogonMethod>prompt</LogonMethod> <EnableSmartcardPromptAutoLogon>false</EnableSmartcardPromptAutoLogon> <EnableSavePassword>false</EnableSavePassword> <EnableKerberos>false</EnableKerberos> <SupportNDS>false</SupportNDS> <NDS_Settings> <DefaultTree> </DefaultTree> </NDS_Settings> <CaptureSmartCardPin>false</CaptureSmartCardPin> </Logon> <ChangePassword> <Allow>Never</Allow> <Method>Direct-Only</Method> </ChangePassword> <UserInterface> <ServerSettings>true</ServerSettings> <FolderDisplaySettings>true</FolderDisplaySettings> <RefreshSettings>false</RefreshSettings> <ReconnectSettings>true</ReconnectSettings> </UserInterface> <ReconnectOptions> <ReconnectFromLogon> <Disconnected>true</Disconnected> <Active>true</Active> </ReconnectFromLogon> <ReconnectFromButton> <Disconnected>true</Disconnected> <Active>true</Active> </ReconnectFromButton> </ReconnectOptions> <FileCleanup> <Logoff>false</Logoff> <Exit>false</Exit> <RefreshApp directoryDepth="0">true</RefreshApp> </FileCleanup> <ICA_Options> <DisplaySize> <Options> <Mode>seamless</Mode> <Mode>fullscreen</Mode> <Dimension> <Width>640</Width> <Height>480</Height> </Dimension> <Dimension> <Width>800</Width> <Height>600</Height> </Dimension> <Dimension> <Width>1024</Width> <Height>768</Height> </Dimension> <Dimension> <Width>1280</Width> <Height>1024</Height> </Dimension> <Dimension> <Width>1600</Width> <Height>1200</Height> </Dimension> </Options> </DisplaySize> <ColorDepth> <Options>4</Options> <Options>8</Options> </ColorDepth> <Audio> <Options>high</Options> <Options>medium</Options> <Options>low</Options> <Options>off</Options> </Audio> <TransparentKeyPassthrough> <Options>local</Options> <Options>remote</Options> <Options>fullscreenonly</Options> </TransparentKeyPassthrough> <SpecialFolderRedirection modifiable="false"> <Enabled>false</Enabled> </SpecialFolderRedirection> </ICA_Options> <AppAccess> <AppAccessMethod>Remote</AppAccessMethod> </AppAccess></PNAgent_Configuration>Why is PNAgent.Request.Enumeration.Location.ReplaceServerLocation an empty string instead of 'http://2003xa/Citrix/PNAgent/enum.aspx' as I expect?procedure TForm1.Button3Click(Sender: TObject);var XML: IXMLDocument; PNAgent: IXMLPNAgent_ConfigurationType;begin XML := TXMlDocument.Create(nil); XML.LoadFromFile('config.xml'); PNAgent := NewPNAgent_Configuration; PNAgent.Text := XML.XML.Text; Memo1.Lines.Add(Format('Server Location: %s', [PNAgent.Request.Enumeration.Location.ReplaceServerLocation]));When I check the value of PNAgent.Request.XML it shows this (values seem to be missing):'<Request><Enumeration><Location replaceServerLocation=""/></Enumeration></Request>'
 
Back
Top