I'm having trouble convincing IE to display my XML when I'm using it in my
application.
I'm creating XML using XmlTextWriter, and then Load() it to IE. The problem
is that in the way, a space is inserted after every character (Like this < ?
x m l v e r s i o n = " 1 . 0 " ? >) Which isn't valid XML, of course.
Here is my code:
private void ShowHtml(Item item)
{
ShowHtml(RoarAp p.CurrentApp.It emToXml(item));//Generate VALID XML
}
private void ShowHtml(string Html)
{
IPersistStreamI nit Persist;
Persist = RoarBrowser.Doc ument as IPersistStreamI nit;
Persist.InitNew ();
Persist.Load(In terop.GetStream (Html));
}
//This is the Interop.GetStre am method
public static UCOMIStream GetStream(strin g Data)
{
IntPtr ptr = Marshal.StringT oHGlobalAuto(Da ta);
UCOMIStream retVal=null;
CreateStreamOnH Global(ptr,true ,ref retVal);
return retVal;
}
application.
I'm creating XML using XmlTextWriter, and then Load() it to IE. The problem
is that in the way, a space is inserted after every character (Like this < ?
x m l v e r s i o n = " 1 . 0 " ? >) Which isn't valid XML, of course.
Here is my code:
private void ShowHtml(Item item)
{
ShowHtml(RoarAp p.CurrentApp.It emToXml(item));//Generate VALID XML
}
private void ShowHtml(string Html)
{
IPersistStreamI nit Persist;
Persist = RoarBrowser.Doc ument as IPersistStreamI nit;
Persist.InitNew ();
Persist.Load(In terop.GetStream (Html));
}
//This is the Interop.GetStre am method
public static UCOMIStream GetStream(strin g Data)
{
IntPtr ptr = Marshal.StringT oHGlobalAuto(Da ta);
UCOMIStream retVal=null;
CreateStreamOnH Global(ptr,true ,ref retVal);
return retVal;
}
Comment