[xml] how to interpret/reproduce this type of xml?



Hello,  I am new to xml and libxml, so please forgive me if the following is an ignorant or simple question.

I'm trying to write some code that reads and writes to a pre-existing xml file format.  
I'm having trouble with one part of the file, where elements of text make up individual elements.  

See below, where the text "Notes 1", "Notes 2", "Notes 3" are each contained within <p></p> brackets?  I am having trouble figuring out how to write in that format or read it, because the content is text, but between the brackets there is also text that is NOT part of the content.  By that I mean that the first <p> is followed by a newline and then some number of characters due to indenting.  The end of the text is followed by another newline and more spaces.  

So it's all due to the formatting that I'm having trouble, but does anyone know how to do this?  Specifically, if I'm reading the file and I get the text between the brackets, how do I know where the formatting ends and the real text starts?  If I'm writing the file, what do I do to write it in this format?

<richcontent TYPE="NOTE"><html>
  <head>

    

  </head>
  <body>
    <p>
      Notes 1
    </p>
    <p>
      Notes 2
    </p>
    <p>
      Notes 3
    </p>
  </body>
</html>
</richcontent>


I really appreciate any help anyone can offer!
Thanks
Bob



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