zoukankan      html  css  js  c++  java
  • Lazarus Reading XML- with TXMLDocument and TDOMNode

    这里读取'HistoryPath' ,'TracePath' 元素下的‘value’属性使用的是

    1. var  
    2.   xmlCfg: TXMLDocument;   
    3.   
    4. ....   
    5.        
    6. function ReadXMLCFG: boolean;   
    7. var  
    8. .....   
    9.   HistoryPath: string = '';   
    10.   TracePath: string = '';   
    11.   vChild: TDOMNode;   
    12. .....   
    13. begin  
    14.   Result := False;   
    15.   if ... then  
    16.   begin  
    17.      .....   
    18.       ReadXMLFile(xmlCfg, vCMSConfigXml);   
    19.       vChild := xmlCfg.DocumentElement.FirstChild;   
    20.       while Assigned(vChild) do  
    21.       begin  
    22.         if vChild.HasAttributes then  
    23.         begin  
    24.           eName := vChild.NodeName;   
    25.           if eName = 'HistoryPath' then  
    26.           begin  
    27.             HistoryPath := vChild.Attributes.GetNamedItem('value').NodeValue;   
    28.           end;   
    29.           if eName = 'TracePath' then  
    30.           begin  
    31.             TracePath := vChild.Attributes.GetNamedItem('value').NodeValue;   
    32.           end;   
    33.         end;   
    34.         vChild := vChild.NextSibling;   
    35.       end;   
    36.    .....   
    37.     end;   
    38.   end;   
    39. end;  
    
    
  • 相关阅读:
    辗转相除法
    并查集(详)
    LCA 最近公共祖先
    RMQ ST表 静态区间最大值
    manacher
    题解 CF33B String Problem
    Linux 下对拍程序
    CSP 考试注意事项
    题解 P4688 [Ynoi2016]掉进兔子洞
    CSP 2020 游记
  • 原文地址:https://www.cnblogs.com/hieroly/p/5201558.html
Copyright © 2011-2022 走看看