473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Showing a XmlDocument

Hi, this is maybe very easy and there's something I'm sure missing here but I
can't find how to show an Xmldocument object in f.ex. ie without save
document as xml first.
Is this possible?
Thanks
Nov 12 '05 #1
7 4102
Hi,

Could you let me know what's f.ex? If you need to get the string which
represents the content of the XmlDocument object, just use
XmlDocument.OuterXml property.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #2
Hi,

Could you let me know what's f.ex? If you need to get the string which
represents the content of the XmlDocument object, just use
XmlDocument.OuterXml property.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #3
Yes, what I want is to show the xmlDoc trought Internet Explorer without
fisically store an XML file. Hope I'm explain myself better now :)

"Kevin Yu [MSFT]" wrote:
Hi,

Could you let me know what's f.ex? If you need to get the string which
represents the content of the XmlDocument object, just use
XmlDocument.OuterXml property.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #4
Are you working on a winform project and trying to start an instance of IE
to show the XmlDocument? If so, I think it impossible to do this. Because
IE didn't expose an interface for us to open an in-memory stream. You have
to write it to a file first.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #5
I see, what if I use ActiveX WebBrowser could this work then?

Thanks for your help and time.

"Kevin Yu [MSFT]" wrote:
Are you working on a winform project and trying to start an instance of IE
to show the XmlDocument? If so, I think it impossible to do this. Because
IE didn't expose an interface for us to open an in-memory stream. You have
to write it to a file first.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #6
Hi,

The IE web browser control cannot do that either, as the Navigate method
only accepts a URL as parameter.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #7
Sometimes it's better to check other newsgroups before writing non-competent
answers...

Here is the code that works this way... It does display xml in WebBrowser
components exactly like MS IE does.

However, you need to have xml.xsl file, that makes XML->HTML transformation.
It's possible to extract this file from IE resources or use google to find
it already in downloadable format.
void ShowXmlInWebBrowser(WebBrowser webBrowser, string xml)
{
XslCompiledTransform t = new XslCompiledTransform();
t.Load("xml.xsl");

MemoryStream ms = new MemoryStream();

StringReader sr = new StringReader(xml);
XmlReader r = XmlReader.Create(sr);

t.Transform(r, null, ms);

ms.Position = 0;

webBrowser.DocumentStream = ms;
}
Nov 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Mark Bram | last post by:
Hi All, Below are two pages I am testing: xmlTest.asp and basic.htm. The idea is to have my asp page read display the (x)html page. Later I will add code in the asp page to edit the contents...
1
by: Martin Honnen | last post by:
With both .NET 1.0 and 1.1 I have found the following strange behaviour where System.Xml.XmlDocument.LoadXml doesn't throw an error when parsing a text node with a character reference to an invalid...
2
by: Graham Pengelly | last post by:
Hi I am trying to transform on System.Xml.XmlDocument into another using XslTransform without writing the object out to a file. I am guessing it should work something like this... public...
2
by: Dave | last post by:
Hi, Is there an easier way to pull a subset of nodes from one XmlDocument to another? I have the code below but would like to know if there is a more streamlined method. Thanks, Dave ...
8
by: pete | last post by:
Hi there, Can someone explain to me why I can't bind to an XmlDocument but I can bind to an XmlNodeList. It's my understanding that they both implement the IEnumerable interface which is...
1
by: Peter Nofelt | last post by:
Hey All, I'm running into this issue with parsing through an xml document by tag name. Below is an example xml document: File Name: things.xml <things> <people> <name>Peter</name>
5
by: Rob Panosh | last post by:
Hello, I am trying to create a xmlDocument from as dataset. My code is listed below. All seems to go well until xmlDocument.Load(CType(ms, System.IO.Stream)) ... I keep getting the following...
2
by: John Smith | last post by:
I'm writing webervice client using .Net 2.0. I have this class: public class MyWebService : SoapHttpClientProtocol { public XmlDocument validate(string url, XmlDocument xmlDocument) {...
1
by: Darsin | last post by:
What i am doing is to pull the data from a CMS and import it to Word 2007 Beta and i also have to export the data from Word 2007 Beta back to that CMS. We have with us two Web Services of the CMS....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.