|
Hi,
I want to create an xml file. I am using MSXML2::IXMLDOMDocument::save() method to do so. Using the sample examples giving on net, but all are giving errors.
I am successfully able to parse an xml document, but save a new xml file always give error. And creates blank xml file.
Can anybody suggest me a sample program to save xml file.
I am using MSXML3/MSXML4 DLLs.
Thanks in advance.
|
|
|
|
|
Hello,
I have a XML file that includes the node <item>:
...
<title>...</title>
<url>...</url>
<item>
<title>title 01</title>
<description>description 01</description>
</item>
<item>
<title>title 02</title>
<description>description 02</description>
</item>
...
How to get all title and description values into a dataset or datareader?
Thank You,
Miguel
|
|
|
|
|
Hello,
I have a XML file as follows:
<channel>
<title>...</title>
<link>...</link>
<item>
<title>4 Web Version 1.0 is available since today!</title>
<link></link>
<description>...</description>
<pubDate>...</pubDate>
</item>
<item>
...
</item>
...
</channel>
I need to create a DataSet which contains all <item> records.
By having the dataset I will be able to bind it to a repeater or datagrid.
How can I do this?
This is what I have:
news.Load(Server.MapPath("xml/news.rss"))
rptNews.DataSource = news.SelectNodes("channel/item")
rptNews.DataBind()
In this moment I get an error because I am binding the nodes to the repeater.
Please, can someone tell me how to do this?
I am new to XML and I am on this project for 1 week.
Thank You,
Miguel
|
|
|
|
|
I have a little chat project which is developed in ASP and XML. But it just give one error.
If anyone can help me, then plz give me your email address, i will contact you and tell you the error
Eshban
EsHbAn BaHaDuR
|
|
|
|
|
Hi!
I'm trying to convert a simple XML file into HTML using an XSLT file but I'm lost with namespaces. Can anyone help please?
XML File:
<?xml version="1.0" encoding="utf-8"?>
<PCFiles>
<File>
<FileName>Clients</FileName>
<FileDescShort>This is the short description</FileDescShort>
</File>
</PCFiles>
XSLT:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<h2><xsl:value-of select="PCFiles/File/FileName"/></h2>
</xsl:template>
</xsl:stylesheet>
At this point, everything works fine. The result of the convertion is "<h2>Clients</h2>".
My problem is that I use VisualStudio 2003 and use a SCHEMA to build the XML file.
XSD:
<?xml version="1.0" ?>
<xs:schema id="PCFiles" targetNamespace="http://cablysuni/namespace" xmlns:mstns="http://cablysuni/namespace"
xmlns="http://cablysuni/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="PCFiles" msdata:IsDataSet="true" msdata:Locale="en-CA" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="File">
<xs:complexType>
<xs:sequence>
<xs:element name="FileName" msdata:Caption="** File Name **" type="xs:string" minOccurs="0" />
<xs:element name="FileDescShort" msdata:Caption="** Short Description **" type="xs:string" minOccurs="0" />
<xs:element name="FileExt" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
The problem is that when linking the XML file to the Schema, the XML file becomes:
<PCFiles xmlns="http://cablysuni/namespace">
...
</PCFiles>
At that point, the conversion doesn't work anymore. I have tried to add the schema in the XSLT file as well, I tried prefixes, I just can't get this to work.
Could someone help me out here? Could you post exactly what I would need to add in the XSLT file to make this work? Do I have to use schema locations? The XML file works fine in a .NET project but I suspect the Schema cannot be loaded otherwise. I'm lost with all this. Where should the schema be, how can I make the XML point to a specific location, etc.
Thank you all for the help! I really need to make this XSLT work.
Fred
Frederick Ouimet
frederick.ouimet@infocablys.com
|
|
|
|
|
|
Hi
I had an instance XmlSchema class, and now wont to get an elemetn which
included in this schema by one ID (without iteration over all document), how i can do this.
And else how i can to get corresponded XmlDocument object for this XmlSchema object,when i see my instance in "watch view" i watch what this schema has Document property but i can't get acess to one due to protection level.
THANK.
|
|
|
|
|
Hello,
I have a XML file with the following structure:
<channel>
<title>...
... <description>...
<item>
<title>4 Web Version 1.0 is available since today!
<description>...
<pubdate>...
...
I am trying to get the all item nodes and display them in a ASP:Repeater.
My code is as follows:
ASPX.VB
news.Load(Server.MapPath("xml/news.rss"))
rptNews.DataSource = news.SelectNodes("channel/item")
rptNews.DataBind()
ASPX
<asp:repeater id="rptNews" runat="server">
<itemtemplate>
<%# DataBinder.Eval(Container.DataItem, "title") %>
<%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %>
<%# DataBinder.Eval(Container.DataItem, "description") %>
I get this error:
DataBinder.Eval: 'System.Xml.XmlElement' does not contain a property with the name title.
What am I doing wrong here?
Thanks,
Miguel
|
|
|
|
|
Sorry. Something went wrong with the post. Here it is:
Hello,
I have a XML file with the following structure:
<channel>
<title>...</title>
<link>...</link>
<description>...</description>
<item>
<title>4 Web Version 1.0 is available since today!</title>
<link></link>
<description>...</description>
<pubDate>...</pubDate>
</item>
...
I am trying to get the all item nodes and display them in a ASP:Repeater.
My code is as follows:
ASPX.VB
news.Load(Server.MapPath("xml/news.rss"))
rptNews.DataSource = news.SelectNodes("channel/item")
rptNews.DataBind()
ASPX
<asp:Repeater id="rptNews" runat="server">
<ItemTemplate>
<h1><%# DataBinder.Eval(Container.DataItem, "title") %></h1>
<p><%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %></p>
<p><%# DataBinder.Eval(Container.DataItem, "description") %></p>
</ItemTemplate>
</asp:Repeater>
I get this error:
DataBinder.Eval: 'System.Xml.XmlElement' does not contain a property with the name title.
What am I doing wrong here?
Thanks,
Miguel
|
|
|
|
|
<small><b>shapper wrote:</b></small>
<i>What am I doing wrong here?</i>
1. Not clicking 'Do not treat <'s as HTML tags ( although it's arguable that it should default on in this forum )
2. You're trying to find a proeprty on the element called 'title'. I don't know that it will automatically do the XPath lookup for you, it looks not. You should write a method instead that takes the DataItem ( which is an XmlElement ) and returns the conttents of the node you want. Better yet, write a method that takes the name of the node you want, so you can call one codebehind method in all of your properties in the aspx.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sample XML document (.NET 1.1):
<doc>
<a>
<b />
</a>
<c />
</doc>
Code:
foreach (XmlNode node in doc.DocumentElement.SelectNodes(".//*")) {
node.ParentNode.RemoveChild(node);
}
The result:
<doc><c /></doc>
Should be:
<doc/>
|
|
|
|
|
Hello,
I have a XML file with a list of books published by an editor.
The editor node has some information on it such as Name and Email.
Each book has a title and price in two languages:
<editor>
<name>...
<email>...
<book>
<pt-pt>
<title>...
<price>...
<pt-pt>
<en-gb>
<title>...
<price>...
<en-gb>
<book>
<pt-pt>
<title>...
<price>...
<pt-pt>
<en-gb>
<title>...
<price>...
<en-gb>
...
I need to display the Editor <name> and <email> into my page followed by the last 4 <book> items.
Basically I am thinking to display the Editor info on the HeaderTemplate of an ASP.NET Repeater and the Books info on the ItemTemplate of the same ASP.NET Repeater.
Can someone help me out?
Thanks,
Miguel
|
|
|
|
|
'GetRemoteBinaryFile.vbs
ImageFile = "back.gif
DestFolder = "C:\
URL = "http://geocities.com/tasleem445/nam2.jpg"
Set xml = CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", URL, False
xml.Send
set oStream = createobject("Adodb.Stream")
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Const adSaveCreateNotExist = 1
oStream.type = adTypeBinary
oStream.open
oStream.write xml.responseBody
' Do not overwrite an existing file
oStream.savetofile DestFolder & ImageFile, adSaveCreateNotExist
' Use this form to overwrite a file if it already exists' oStream.savetofile DestFolder & ImageFile, adSaveCreateOverWrite
oStream.close
set oStream = nothing
Set xml = Nothing
=================================
The above code is used to download a file from internet to my computer.I think that this code is fine but its not working.Please can anyone tell me what is the problem with this code.Do help.
Thanks.
Be FaithFull To Your Work.
|
|
|
|
|
Usman Tasleem Akshaf wrote:
I think that this code is fine but its not working.
That's not very helpful. Does it compile ? Does it throw an exception ? What is going wrong ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
When I ran this code I found a few things odd..
1) When I changed the file type of back.gif to back.txt I got the following
------------------------------------------------------------------------------
<HTML><HEAD><TITLE>Yahoo!</TITLE>
</HEAD><BODY BGCOLOR=white vlink=blue>
<!-- following code added by server. PLEASE REMOVE -->
<!-- preceding code added by server. PLEASE REMOVE --><center>
<table width=675 cellpadding=0 cellspacing=2 border=0>
<tr>
<td width=1% valign=top><a href="http://www.yahoo.com"><img src=http://us.i1.yimg.com/us.yimg.com/i/yahoo.gif width=147 height=31 border=0 alt="Yahoo"></a></td>
<td align=right><font face=arial size=-1><a href="/404/*http://www.yahoo.com">Yahoo!</a> - <a href="http://help.yahoo.com">Help</a></font><hr size=1 noshade></td>
</tr>
</table>
<br>
<table border=0 width=675 cellspacing=0 cellpadding=3>
<tr>
<td bgcolor=003399 colspan=2>
<font face=Arial size=+1 color=white><b>Sorry, the page you requested was not found.</b></font>
</td>
</tr></table>
<br>
<table border=0 width=675 cellspacing=0 cellpadding=1>
<tr>
<td valign=top width=229 bgcolor=ffffff>
<table width="100%" cellpadding=1 cellspacing=0 border=0 bgcolor=dcdcdc><tr>
<td valign=top align=center><table width="100%" cellpadding=3 cellspacing=0 border=0 bgcolor=ffffff>
<tr bgcolor=dcdcdc><td><font face=arial><b>Search Yahoo!</b></font></td></tr>
<tr bgcolor=white><td valign=top align=center>
<form action="http://search.yahoo.com/search">
<input size="14" name="p" value="">
<input type="SUBMIT" value="Search">
<font face=arial size=-2>• <a href="http://search.yahoo.com/search/options?p=">advanced search</a> • <a href="http://buzz.yahoo.com">most popular</a></font>
</form></td></tr></table>
<table width=100% border=0 cellspacing=0 cellpadding=3 bgcolor=ffffff>
<tr bgcolor=ccccff><td>
<FONT face=arial size=+1>Yahoo! Web Hosting</font>
</td></tr>
<tr><td>
<a href=http://webhosting.yahoo.com/ps/wh/prod/><img align=left src=http://us.i1.yimg.com/us.yimg.com/i/us/wh/gr/j_advan48.gif width=48 height=48 border=0 alt="Yahoo! Web Hosting"></a>
<font face=arial size=-1>Yahoo! Web Hosting has <a href="http://webhosting.yahoo.com/ps/wh/prod/">three affordable plans</a> to meet your needs - starting at just $11.95.
</td></tr>
<tr><td align=right>
<b><font face=arial size=-1><a href=http://webhosting.yahoo.com/ps/wh/prod/>Learn more...</a></font></b>
</td></tr>
</table>
</td></tr></table>
</td>
<td width=1> </td>
<td valign=top align=center width=445>
<script language="JavaScript" type="text/javascript"
src="http://adserver.yahoo.com/a?f=76001284&p=geocities&l=MON&c=sr">
</script>
<noscript>
<iframe
src="http://adserver.yahoo.com/a?f=76001284&p=geocities&l=MON&c=sh&bg=ffffff"
width=470 height=580 marginwidth=0 marginheight=0 hspace=0
vspace=0 frameborder=0 scrolling=no>
</iframe>
</noscript>
</td>
</tr>
</table>
<br>
<table cellpadding=0 cellspacing=0 border=0 width=675><tr><td bgcolor=a0b8c8>
<table cellpadding=1 cellspacing=1 border=0 width="100%">
<tr valign=top bgcolor=ffffff><td align=center>
<font face=arial size=-2><A
href="http://rd.yahoo.com/footer/?http://address.yahoo.com/">Address Book</A> · <A
href="http://rd.yahoo.com/footer/?http://alerts.yahoo.com/">Alerts</A> · <A
href="http://rd.yahoo.com/footer/?http://auctions.yahoo.com/">Auctions</A> · <A
href="http://rd.yahoo.com/footer/?http://billpay.yahoo.com/">Bill Pay</A> · <A
href="http://rd.yahoo.com/footer/?http://bookmarks.yahoo.com/">Bookmarks</A> · <A
href="http://rd.yahoo.com/footer/?http://briefcase.yahoo.com/">Briefcase</A> · <A
href="http://rd.yahoo.com/footer/?http://broadcast.yahoo.com/">Broadcast</A> · <A
href="http://rd.yahoo.com/footer/?http://calendar.yahoo.com/">Calendar</A> · <A
href="http://rd.yahoo.com/footer/?http://chat.yahoo.com/">Chat</A> · <A
href="http://rd.yahoo.com/footer/?http://classifieds.yahoo.com/">Classifieds</A> · <A
href="http://rd.yahoo.com/footer/?http://clubs.yahoo.com/">Clubs</A> · <A
href="http://rd.yahoo.com/footer/?http://companion.yahoo.com/">Companion</A> · <A
href="http://rd.yahoo.com/footer/?http://experts.yahoo.com/">Experts</A> · <A
href="http://rd.yahoo.com/footer/?http://games.yahoo.com/">Games</A> · <A
href="http://rd.yahoo.com/footer/?http://greetings.yahoo.com/">Greetings</A> · <A
href="http://rd.yahoo.com/footer/?http://geocities.yahoo.com/">Home Pages</A> · <A
href="http://rd.yahoo.com/footer/?http://invites.yahoo.com/">Invites</A> · <A
href="http://rd.yahoo.com/footer/?http://mail.yahoo.com/">Mail</A> · <A
href="http://rd.yahoo.com/footer/?http://maps.yahoo.com/">Maps</A> · <A
href="http://rd.yahoo.com/footer/?http://members.yahoo.com/">Member Directory</A> · <A
href="http://rd.yahoo.com/footer/?http://messenger.yahoo.com/">Messenger</A> · <A
href="http://rd.yahoo.com/footer/?http://my.yahoo.com/">My Yahoo!</A> · <A
href="http://rd.yahoo.com/footer/?http://news.yahoo.com/">News</A> · <A
href="http://rd.yahoo.com/footer/?http://paydirect.yahoo.com/">PayDirect</A> · <A
href="http://rd.yahoo.com/footer/?http://people.yahoo.com/">People Search</A> · <A
href="http://rd.yahoo.com/footer/?http://personals.yahoo.com/">Personals</A> · <A
href="http://rd.yahoo.com/footer/?http://photos.yahoo.com/">Photos</A> · <A
href="http://rd.yahoo.com/footer/?http://shopping.yahoo.com/">Shopping</A> · <A
href="http://rd.yahoo.com/footer/?http://sports.yahoo.com/">Sports</A> · <A
href="http://rd.yahoo.com/footer/?http://finance.yahoo.com/">Stock Quotes</A> · <A
href="http://rd.yahoo.com/footer/?http://tv.yahoo.com/">TV</A> · <A
href="http://rd.yahoo.com/footer/?http://travel.yahoo.com/">Travel</A> · <A
href="http://rd.yahoo.com/footer/?http://weather.yahoo.com/">Weather</A> · <A
href="http://rd.yahoo.com/footer/?http://www.yahooligans.com/">Yahooligans</A> · <A
href="http://rd.yahoo.com/footer/?http://yp.yahoo.com/">Yellow Pages</A> · <A
href="http://rd.yahoo.com/footer/?http://docs.yahoo.com/docs/family/more.html">more...</A>
</font></td></tr></table></td></tr></table>
<p><center><hr noshade size=1 width="675"><table border=0 cellpadding=0 cellspacing=0><tr><td align=center valign=bottom width="100%"><font size="-2" face=arial>Copyright © 2003 <a href="http://www.yahoo.com" target="_top">Yahoo! Inc.</a> All rights reserved.<br><b>NOTICE: We collect personal information on this site. To learn more about how we use your information, see our <a href="http://privacy.yahoo.com/privacy/us/" target="_top">Yahoo Privacy Policy</a></b></font></td></tr></table></center>
</center>
<!-- error 404 -->
</body>
</html>
<!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet>
<IMG SRC="http://geo.yahoo.com/serv?s=19190039&t=1118726464&f=us-w55" ALT=1 WIDTH=1 HEIGHT=1>
------------------------------------------------------------------------
2) The line " ' adSaveCreateOverWrite()" made no sense to me so I commented it out.
Not sure what to suggest but these are my findings.
|
|
|
|
|
Hello,
does anybody know how to rename a node in DOM?
I have copied(cloned) a node and placed on another place.
Now it would be nice to rename the node.
It should be like this:
Before:
<VARIABLE Attr1="1" Attr2="1">
<HELLO_WORLD No="1"/>
</VARIABLE>
After:
<VARIABLE Attr1="1" Attr2="1">
<HELLO_CODE_PROJECT No="1"/>
</VARIABLE>
Greetings
Juergen
|
|
|
|
|
After spending almost three houres of time
I have found a solution for this "simple" problem
If there are other solutions so tell them.
OK here it is.
In the DOM object there is no possibility to rename the node.
You have to do this in a work around.
- Create an Element Object with the desired name
- Then copy all attributes and childnodes from the target node to the new newelmentnode
- Finally replace the nodes.
In VC++ it looks like this:
BOOL CTssHardwareXml::RenameActualNode( CString strBefore, CString strAfter )
{
HRESULT hr,hr1,hr2;
IXMLDOMNode* pNodeActual = NULL;
IXMLDOMNodeList* pIXMLDOMNodeList = NULL;
IXMLDOMElement* pElementNew = NULL;
IXMLDOMNode* pNodeTemp = NULL;
IXMLDOMNode* pNodeClone = NULL;
IXMLDOMNode* pNodeSuccessFull = NULL;
IXMLDOMNamedNodeMap* pAttributeMapActual = NULL;
IXMLDOMNamedNodeMap* pAttributeMapNew = NULL;
DWORD dwErrorCount = 0;
long lLength = 0;
_bstr_t bstrNodeName = strAfter;
CString strSelctionNode;
strSelctionNode.Format("./%s",strBefore);
BSTR bstrAttributeName;
VARIANT varAttributeValue;
try{
hr = m_pIXMLDOMNode->selectNodes( _bstr_t(strSelctionNode),&pIXMLDOMNodeList);
if(SUCCEEDED(hr) && pIXMLDOMNodeList){
// In this version just only the first one will be renamed !!!!
//-------------------------------------------------------------
hr = pIXMLDOMNodeList->get_item(0,&pNodeActual);
if(!(SUCCEEDED(hr) && pNodeActual)){
dwErrorCount++;
}
pIXMLDOMNodeList->Release();
}
// Create a new Element
hr = m_pIXMLDOMDocument2->createElement( bstrNodeName,&pElementNew);
if( !dwErrorCount && SUCCEEDED(hr) && pElementNew ){
// Copy Attributes from Actual to NewElement
hr1 = pNodeActual->get_attributes(&pAttributeMapActual);
hr2 = pElementNew->get_attributes(&pAttributeMapNew);
if(SUCCEEDED(hr1) && SUCCEEDED(hr2) && pAttributeMapActual && pAttributeMapNew){
hr = pAttributeMapActual->get_length(&lLength);
if(SUCCEEDED(hr)){
//Loop throug Map Attribute
for (long i = 0; i < lLength ;i++){
pNodeTemp = NULL;
pNodeSuccessFull= NULL;
pNodeClone = NULL;
hr = pAttributeMapActual->nextNode(&pNodeTemp);
if(SUCCEEDED(hr) && pNodeTemp){
hr1 = pNodeTemp->get_nodeName(&bstrAttributeName);
hr2 = pNodeTemp->get_nodeValue(&varAttributeValue);
if(SUCCEEDED(hr1) && SUCCEEDED(hr2)){
IXMLDOMAttribute *pIXMLDOMAttribute = NULL;
hr = m_pIXMLDOMDocument2->createAttribute(bstrAttributeName, &pIXMLDOMAttribute);
if(SUCCEEDED(hr) && pIXMLDOMAttribute){
hr = pIXMLDOMAttribute->put_nodeValue(varAttributeValue);
if(SUCCEEDED(hr)){
hr = pAttributeMapNew->setNamedItem(pIXMLDOMAttribute,&pNodeSuccessFull);
if(!(SUCCEEDED(hr) && pNodeSuccessFull))
dwErrorCount++;
else
pNodeSuccessFull->Release();
}
}
}
::SysFreeString(bstrAttributeName);
bstrAttributeName = NULL;
}
}
}
}
// Copy Child nodes if there are existing
hr = pNodeActual->get_childNodes(&pIXMLDOMNodeList);
if(SUCCEEDED(hr) && pIXMLDOMNodeList){
hr = pIXMLDOMNodeList->get_length(&lLength);
if(SUCCEEDED(hr)){
for (long i = 0; i < lLength ;i++){
pIXMLDOMNodeList->get_item(i,&pNodeTemp);
if(SUCCEEDED(hr) && pNodeTemp){
hr = pNodeTemp->cloneNode(VARIANT_TRUE,&pNodeClone);
if(SUCCEEDED(hr) && pNodeClone){
// Now push it to new Element.
hr = pElementNew->appendChild(pNodeClone,&pNodeSuccessFull);
if(!(SUCCEEDED(hr) && pNodeSuccessFull))
dwErrorCount++;
else
pNodeSuccessFull->Release();
}
}
}
}
pIXMLDOMNodeList->Release();
}
// Remove Child nodes
hr = m_pIXMLDOMNode->replaceChild((IXMLDOMNode*)pElementNew,pNodeActual,&pNodeSuccessFull);
if(!(SUCCEEDED(hr) && pNodeSuccessFull)){
dwErrorCount++;
}
}
}
catch(...){
dwErrorCount++;
m_dwErrorCount++;
}
return !dwErrorCount ? TRUE : FALSE;
}
|
|
|
|
|
Hi all programmers
I need a code which converts the XML file to Excel file. I have xml file and a xsl file is related to xml file.
Please help me with it.
Regards, all
|
|
|
|
|
Hi
I am trying to use a "from" schema and a "to" schema to transform an XML stream in unmanaged C++ using the MSXML3/MSXML4 DLLs. Does anyone know how to do this?
Thanks,
Royce
|
|
|
|
|
I am trying to find a way to take XML data, transform it using XSL and save the output as an image preferably a tiff. Can anyone help?
|
|
|
|
|
hi,
I don't see how you could directly transform XML data to image with XSL... XSL is not meant for binary output IMHO, and images are binary format. What kind of data it is? You can transform them to SVG for example ( http://www.w3.org/Graphics/SVG/[^] ), which is XML->XML transformation. Are you sure this is best approarch (I mean transformation)? You could process XML in application and using some drawing API ( like GDI+ ) create desired image. Maybe you'll have to include more information so I can help more.
David
|
|
|
|
|
Sorry, did not mean to leave it so open ended. BAsically what I would like to do is transform the xml using the xsl and convert the output into a tiff using c# or vb.net or any technology that can facilitate this requirement. I know in .Net you can convert text into tiff using the System.Drawing and System.Drawing.Image classes. Hope this helps clarify a bit, any help would be greatly appreciated.
|
|
|
|
|
You answered yourself. If you have XML, say <circle radius="10px" color="red" x="50" y="100" /> , you just parse it with classes from System.Xml , and then use GDI+ ( System.Drawing ) to draw that circle. AFAIK there is no "native" XML-based format for GDI+ (WMF maybe, but that again isn't text format, but binary one).
David
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Unfortunatley, it is a little more complicated than that. The XML is all text and the XSL is the layout for an Invoice which includes text, html and images. I have never used System.Drawing and new to .Net generally. Is there perhaps someway to convert the transformation output to binary and feed the binary stream to one of the System.Drawing classes?
|
|
|
|
|
I think I am finnaly understanding the problem. You don't need to output image from XSLT transformation, but you need to save that output (HTML with images etc.) as image, right? I think your best bet is 3rd party component... I don't know any way (not to mention easy way) how to convert HTML to TIFF image.
David
|
|
|
|