Changes between Initial Version and Version 1 of XmlNotes


Ignore:
Timestamp:
Aug 25, 2009, 2:20:51 PM (15 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XmlNotes

    v1 v1  
     1= XML notes =
     2
     3BOINC originally used a line-oriented parser with primitives like
     4{{{
     5parse_str(tag, buf, len);
     6}}}
     7This is not a general XML parser;
     8it's able to parse only the XML generated by BOINC itself.
     9For example, it can parse
     10{{{
     11<file>
     12   <url>http://foo.bar</url>
     13</fil>
     14}}}
     15but not
     16{{{
     17<file><url>http://foo.bar</url></file>
     18}}}
     19or
     20{{{
     21<file>
     22   <url>
     23      http://foo.bar
     24   </url>
     25</file>
     26}}}
     27
     28More recently, we added a better parser (class XML_PARSER).
     29However, much of the code still uses the old parser.
     30
     31== XML encoding ==
     32
     33Both of the parsers decode XML entities when parsing strings.
     34
     35The functions that generate XML don't generally encode XML entities in strings.
     36Most strings are generated by BOINC itself and will never contain special characters.
     37The following fields may contain special characters,
     38and are XML-encoded by the functions that generate XML:
     39
     40{{{
     41client:
     42PROJECT::user_name, team_name
     43FILE_INFO::url
     44APP_INIT_DATA::user_name, team_name
     45PROXY_INFO::http_user_name, http_user_passwd, socks5_user_name, socks5_passwd
     46HOST_INFO::p_vendor, p_model, os_name, os_version, serialnum
     47
     48server (db_dump and db_purge):
     49USER::name, url
     50TEAM::name, url, name_hteml, description
     51RESULT::stderr_out
     52}}}
     53
     54In addition, the RESULT::stderr_out (client) is enclosed in <![CDATA[ ...]]>