Back to index

texmacs  1.0.7.15
Classes | Functions | Variables
parsexml.cpp File Reference
#include "convert.hpp"
#include "hashset.hpp"
#include "converter.hpp"
#include "parse_string.hpp"

Go to the source code of this file.

Classes

struct  xml_html_parser

Functions

void load_html_entities (hashmap< string, string > table, string fname)
static string simple_quote (string s)
tree parse_xml (string s)
tree parse_html (string s)

Variables

static hashset< stringhtml_empty_tag_table
static hashset< stringhtml_auto_close_table
static hashset< stringhtml_block_table
static hashmap< string, stringhtml_entity ("")

Function Documentation

void load_html_entities ( hashmap< string, string table,
string  fname 
)

Definition at line 102 of file parsexml.cpp.

                                                                      {
  string s;
  if (DEBUG_VERBOSE) cout << "TeXmacs] Loading " << fname << "\n";
  if (load_string (url ("$TEXMACS_PATH/langs/encoding", fname), s, false)) return;
  tree t= block_to_scheme_tree (s);
  if (!is_tuple (t)) return;

  int i, n= N(t);
  for (i=0; i<n; i++)
    if (is_func (t[i], TUPLE, 2) &&
       is_atomic (t[i][0]) && is_atomic (t[i][1]))
      {
       string l= t[i][0]->label; if (is_quoted (l)) l= scm_unquote (l);
       string r= t[i][1]->label; if (is_quoted (r)) r= scm_unquote (r);
       table (l)= r;
      }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 802 of file parsexml.cpp.

                      {
  xml_html_parser parser;
  parser.html= true;
  tree t= parser.parse (s);
  return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 794 of file parsexml.cpp.

                     {
  xml_html_parser parser;
  parser.html= false;
  tree t= parser.parse (s);
  return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static string simple_quote ( string  s) [static]

Definition at line 711 of file parsexml.cpp.

                        {
  return "\"" * s * "\"";
}

Here is the caller graph for this function:


Variable Documentation

Definition at line 98 of file parsexml.cpp.

Definition at line 99 of file parsexml.cpp.

Definition at line 97 of file parsexml.cpp.