locked
XML + HTML RRS feed

  • Question

  •  

    Hello fellow developers,

     

    Im building a system that will only use db for the necessary since we dont want to update entire app, when we can do that with xml files.

    So, my problem is the following.

    On a window there will be wpf controls (textbox, combobox, etc) and grid (its a listview with more than one column).

    Now, all controls are filled based on values described on the xml file

    The biggest problem is that we dont know how big can the grid be. Can be a (1,1) or (10,10), so my idea was to add a html table to the xml.

     

     

    Code Snippet

    <Models>

    <Year>

    <Scenario>

    <Anexo>

    <Page>

    <Field/>

    <Active/>

    <Value/>

    <Formula/>

    <ObjectControl/>

    <Table/>

    </Page>

    </Anexo>

    </Scenario>

    </Year>

    </Models>

     

     

    So, under the <Table> element we should have a <TR><TD></TD></TR> definition.

     

    Do you have any better idea to achieve this?

    Or in case this is a good idea, how can i achieve it?

    Will i have to create the HMTL in code and append it to the XML file?

    Will u have to do my own parser to read the HTML block?

     

    Thanks and best regards,

    Wednesday, July 9, 2008 11:32 AM

Answers

  • If you want to make use of HTML tables in your XML then at least use XHTML tables, that way your XML is a complete well-formed XML document and you can use XML APIs to create (e.g. XmlWriter) and parse (e.g. XmlReader) the XML.

    Wednesday, July 9, 2008 4:01 PM

All replies

  • If you want to make use of HTML tables in your XML then at least use XHTML tables, that way your XML is a complete well-formed XML document and you can use XML APIs to create (e.g. XmlWriter) and parse (e.g. XmlReader) the XML.

    Wednesday, July 9, 2008 4:01 PM
  •  

    Ty Martin,

     

    Ill look into it and if i have any questions arise ill return Smile

    Wednesday, July 9, 2008 4:17 PM