我的网站(每个页面)上都有一个简单的侧边栏,其中包含以下html:
var
Feed,
Entry,
Content,
Props,
DollarSellRate: IXMLNode;
STitle: string;
...
XMLDoc.FileName := 'myfile.xml';
XMLDoc.Active := True;
Feed := XMLDoc.DocumentElement;
Entry := Feed.ChildNodes['entry'];
if Entry = nil then ... // handle the error as needed..
Content := Entry.ChildNodes['content'];
if Content = nil then ... // handle the error as needed..
Props := Content.ChildNodes.FindNode('properties', 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata');
if Props = nil then ... // handle the error as needed..
DollarSellRate := Props.ChildNodes.FindNode('DollarSellRate', 'http://schemas.microsoft.com/ado/2007/08/dataservices');
if DollarSellRate = nil then ... // handle the error as needed..
STitle := DollarSellRate.Text;
这很好用,除了每当页面重新加载或更改时它都会折叠所有内容。为此,我想记住已打开并保留了哪些菜单。
有什么可以帮助您的吗?