1

How build ASP.NET MVC View page from XML file?

<?xml version="1.0" encoding="utf-8" ?> 
- <TecajnaLista>
- <Valuta>
<Drzava>Australija</Drzava> 
<Oznaka>AUD</Oznaka> 
<Sfr>036</Sfr> 
<Jedinica>1</Jedinica> 
<Iznos>4.385692</Iznos> 
</Valuta>
- <Valuta>
<Drzava>Japan</Drzava> 
<Oznaka>YPY</Oznaka> 
<Sfr>392</Sfr> 
<Jedinica>100</Jedinica> 
<Iznos>4.704524</Iznos> 
</Valuta>
- <Valuta>
<Drzava>Velika Britanija</Drzava> 
<Oznaka>GBP</Oznaka> 
<Sfr>826</Sfr> 
<Jedinica>1</Jedinica> 
<Iznos>10.960638</Iznos> 
</Valuta>
- <Valuta>
<Drzava>USA</Drzava> 
<Oznaka>USD</Oznaka> 
<Sfr>840</Sfr> 
<Jedinica>1</Jedinica> 
<Iznos>5.570351</Iznos> 
</Valuta>
- <Valuta>
<Drzava>EU</Drzava> 
<Oznaka>EUR</Oznaka> 
<Sfr>978</Sfr> 
<Jedinica>1</Jedinica> 
<Iznos>7.357876</Iznos> 
</Valuta>
</TecajnaLista>

I have build data table from this XML

1
  • 1
    You are not giving enough information for anyone to even start answering your question. What is your XML looking like? What is it supposed to output? Commented May 11, 2010 at 10:57

2 Answers 2

2

Checkout the XmlResult type in MVC Contrib.

Sign up to request clarification or add additional context in comments.

Comments

0

In the controller you can load an XmlDocument from the xml file; next you can pass the XmlNode as to a strongly typed View. Once that is done, you can use all normal XmlNode methods to compose your view.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.