Changeset 254

Show
Ignore:
Timestamp:
04/24/07 16:22:18 (2 years ago)
Author:
kindlund
Message:

Cleaned up documentation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-multi_config/lib/HoneyClient/Util/Config.pm

    r253 r254  
    328328a value like the following, within the global configuration file: 
    329329 
    330 <HoneyClient> 
    331     <Agent> 
    332         <Driver> 
    333             <address>localhost</address> 
    334         </Driver> 
    335     </Agent> 
    336 </HoneyClient> 
     330  <HoneyClient> 
     331      <Agent> 
     332          <Driver> 
     333              <address>localhost</address> 
     334          </Driver> 
     335      </Agent> 
     336  </HoneyClient> 
    337337 
    338338If the "address" value is not found at this level within the XML tree, 
     
    341341# First try: 
    342342 
    343 <HoneyClient> 
    344     <Agent> 
    345         <address>localhost</address> 
    346     </Agent> 
    347 </HoneyClient> 
     343  <HoneyClient> 
     344      <Agent> 
     345          <address>localhost</address> 
     346      </Agent> 
     347  </HoneyClient> 
    348348 
    349349# Last try: 
    350350 
    351 <HoneyClient> 
    352     <address>localhost</address> 
    353 </HoneyClient> 
     351  <HoneyClient> 
     352      <address>localhost</address> 
     353  </HoneyClient> 
    354354 
    355355This function will stop its recursive search at the first value found, 
     
    363363a getVar(name => "foo") on the following XML: 
    364364 
    365 <HoneyClient> 
    366     <foo> 
    367         <bar>123</bar> 
    368         <bar>456</bar> 
    369         <yok>789</yok> 
    370         <yok>xxx</yok> 
    371     </foo> 
    372 </HoneyClient> 
     365  <HoneyClient> 
     366      <foo> 
     367          <bar>123</bar> 
     368          <bar>456</bar> 
     369          <yok>789</yok> 
     370          <yok>xxx</yok> 
     371      </foo> 
     372  </HoneyClient> 
    373373 
    374374Then the following $hashref will be returned: 
    375375 
    376 $hashref = { 
    377     'bar' => [ '123', '456' ], 
    378     'yok' => [ '789', 'xxx' ], 
    379 
     376  $hashref = { 
     377      'bar' => [ '123', '456' ], 
     378      'yok' => [ '789', 'xxx' ], 
     379 
    380380 
    381381I<Inputs>: 
     
    397397For example, if we perform a getVar(name => "foo") on the following XML: 
    398398 
    399 <HoneyClient> 
    400     <foo> 
    401         THIS_TEXT_WILL_BE_LOST 
    402         <bar>123</bar> 
    403         <bar>456</bar> 
    404         <yok>789</yok> 
    405         <yok>xxx</yok> 
    406         <yok><CHILD>zzz</CHILD></yok> 
    407     </foo> 
    408 </HoneyClient> 
     399  <HoneyClient> 
     400      <foo> 
     401          THIS_TEXT_WILL_BE_LOST 
     402          <bar>123</bar> 
     403          <bar>456</bar> 
     404          <yok>789</yok> 
     405          <yok>xxx</yok> 
     406          <yok><CHILD>zzz</CHILD></yok> 
     407      </foo> 
     408  </HoneyClient> 
    409409 
    410410Then the following $hashref will be returned: 
    411411 
    412 $hashref = { 
    413     'bar' => [ '123', '456' ], 
    414     'yok' => [ '789', 'xxx', 'zzz' ], 
    415 
     412  $hashref = { 
     413      'bar' => [ '123', '456' ], 
     414      'yok' => [ '789', 'xxx', 'zzz' ], 
     415 
    416416 
    417417Notice how the B<THIS_TEXT_WILL_BE_LOST> string got dropped and that