[xml] Tagged elements inside text



Hello:

  I have been testing some examples with libxml2-2.4.24 and i have a problem.
  
  I load an xml document from disk with:
  
    xmlKeepBlanksDefault(0);
    xmlParseFile(filename);
   
and i find out problems when loading this xml file:
  
  <roottag>
    <tag1>text1</tag1>
    <tag2>text2</tag2>
    <tag3>text3<subtag1>text4</subtag1>text5</tag3>
  </roottag>

    The problem is in tag3. it has a "standard node" inside two "text
 nodes". I'm not sure, but i think it's posible and valid in xml
 specification to do this. When i check the node which corresponds to tag3,
 there are three children (all text nodes) and the content of these are:

    1st->text3text5
    2nd->text5
    3rd->text5

    I think the "tag3 node" had to have three children, but of type: "text
node", "standard node", "text node" (the content is intuitive). Isn't it?

    Is there any problem at library implementation in this case, or is
there another problem?

Thanks in advance,

  Mario



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]