using xml as html

  • Thread starter Thread starter kal
  • Start date Start date
K

kal

Hi.

I have some xhtml in a file called test.xml.
I created a div on my page then in the page load event i load test.xml into
a smldoc and then
div.innerhtml=doc.innerxml

this seems to work - for all the text bit - but wont seem to get the <img>
that i have in the xml file.

is there some other way i shoud be doing this?

Thanks

Kal
 
Hi.

I have some xhtml in a file called test.xml.
I created a div on my page then in the page load event i load test.xml into
a smldoc and then
div.innerhtml=doc.innerxml

this seems to work - for all the text bit - but wont seem to get the <img>
that i have in the xml file.

is there some other way i shoud be doing this?

Thanks

Kal

hi,
i'm try this way and get things working

<body>
<form id="form1" runat="server">
<div runat="server" id="xmldiv">
</div>
</form>
</body>

protected void Page_Load(object sender, EventArgs e)
{
xmldiv.InnerHtml="<img src=\"0.jpg\" />";
}

can you please show how you images are pointed in xml

nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd
 
Thanks - I resolved this - sorry - it was a path problem - i had to change
the path to the image so that it was relative to the aspx page and not the
xml file.

thanks
 
Hi.

I have some xhtml in a file called test.xml.
I created a div on my page then in the page load event i load test.xml into
a smldoc and then
div.innerhtml=doc.innerxml

this seems to work - for all the text bit - but wont seem to get the <img>
that i have in the xml file.

is there some other way i shoud be doing this?

Thanks

Kal

......................opps i was mistake...i was remove the original
post...
hi,
i'm try this way and get things working


<body>
<form id="form1" runat="server">
<div runat="server" id="xmldiv">
</div>
</form>
</body>


protected void Page_Load(object sender, EventArgs e)
{
xmldiv.InnerHtml="<img src=\"0.jpg\" />";
}


can you please show how you images are pointed in xml


nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd
 
Back
Top