1

I have an issue where i need to read a certain xml file which contains elements that contains styled html formatting. Like this:

<people>
  <person>
    <name>Jack</name>
    <age>35</age>
    <text_description>
      <div topic="Stuff" level="2">
        <p><h2>Text Stuff</h2></p>
        <div topic="More_Stuff" level="8">
        <p>Text More_stuff</p></div>
        .
        .
        .
      </div>
  </person>
</people>

creating a class to hold the data from the file is not hard, but I'm having issues with treating the descendants of text_description element as a string/text. I tried using [XmlText] instead of [XmlElement(ElementName = "full_text")], but to no avail. The reason why i'd like to keep this is to use that formatting later down the line.

0 Answers0