|
|
How can i create a *.xml using msxml.dll in vc++ ? Any help links..
Thank you.
|
|
|
|
|
Create a new text file named *.xml, and save it;P
Please be more specific.
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|
DOMDocument::save(...)
How low can you go ? (MS rant)
|
|
|
|
|
http://msdn.microsoft.com[^]
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
See this link[^] that explains how to do this, as well as other standard operations using MSXML.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi, I'm new to all this XML stuff, and I'm trying to figure out how I can code a table join like you can in SQL. Is this even possible with XML? I've got an XML file with 2 tables, and I'd like to perform a query where table1.id = table2.t1_id, for example. I've looked into XPath, and it doesn't seem like it can do the trick.
Thanks!
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator.
|
|
|
|
|
Depends on what you are looking for. Using a transformation xslt and using the XPath select in which you match the child element (or attribute) value, in the select statement, can give you the relation. I.E. select table 1 first and then for each child entity run a select of table 2 with the value from table 1 as part of the select statement. If you just want to use some of the values of the initial element (table 1) you can pass those values with the param usage and then only perform the output in the second template.
|
|
|
|
|
Marc Clifton wrote:
and I'd like to perform a query where table1.id = table2
XML Query[^] may be what you are looking for.
Paul Watson Bluegrass Cape Town, South Africa
Ray Cassick wrote:
Well I am not female, not gay and I am not Paul Watson
|
|
|
|
|
|
<xsl:template match="//table2[table1/@id = @id]"><br />
...<br />
</xsl:template>
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
|
hello
i need help on how to convert xsl:fo or xml document to pdf using c sharp
i BADLY need that.
Asim
|
|
|
|
|
|
|
some good software is at http://www.antennahouse.com[^]
you will have to use interop, or shell the exe - but its a nice product and pretty conformant to the standard.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hello,
this is a very basic problem, i think. How can I define an url in the XML file and format/output it with a XSL file?
This is my XML file:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE archive SYSTEM "archive.dtd">
<?xml-stylesheet href="archive.xsl" type="text/xsl"?>
<archive>
<entry>
<name>Download 1</name>
<webcode>DWL1</webcode>
<link>link</link>
</entry>
<entry>
<name>Download 2</name>
<webcode>DWL2</webcode>
<link>link2</link>
</entry>
</archive>
This is my XSL file:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template>
<link rel="stylesheet" type="text/css" href="default.css"/>
<h1>Archive</h1>
<table>
<tr><td>
<img src="images/menulinks.gif"/>
Downloads</td></tr></table><br/><br/>
<table>
<tr>
<td width="33%">Name</td>
<td width="33%">Webcode</td>
<td>Goto</td>
</tr>
<xsl:for-each select="archive/entry">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="webcode"/></td>
<td><a href=" WHAT HERE??? "><xsl:value-of select='link'/></a></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
What do i have to put in the 8. line above? ("WHAT HERE???")
This mustn't be a fixed string, it must be loadable from the .xml file. How do i encode the link in the XML file?
-Dominik
|
|
|
|
|
you need to use xsl:attribute to create the href= part of the anchor tag. Something like:
<a>
<xsl:attribute name="href">
<xsl:value-of select="href"/>
</xsl:attribute>
</a>
That's off the top of my head, but it's basically correct.
Christian
<i>No offense, but I don't really want to encourage the creation of another VB developer.</i> - <b>Larry Antram 22 Oct 2002</b>
<i>Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that...</i> - <b>Shog9 04-09-2002</b>
<i>During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. </i> - <B>Alex E. - 12-Sept-2002</B>
|
|
|
|
|
or the short version:
<a href="{link}"><xsl:value-of select='link'/></a>
notice the use of the curly brakets to shortcut any xpath expression....
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
That looks great - how does it work ? It's pulling a node called 'link' out of the current context node, and the curly brackets mean that it's put into there, or the curly brackets pull it out of the current context node seperately ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
curly brackets are shorthand - they tell the xsl processor to replace the contents with the result of the xpath xpresions
xml:
<company logo="bob.gif"/>
xlst:
<xsl:apply-template match="company"><br />
<img src="{@logo}"/><br />
</xsl:apply-template>
hope this makes sense - saves alot of typing
[edit]note that is always in the context of the current node - so equal to current()/@logo
[/edit]
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Cool - yes, thanks. I did not know you could do that, and I will find it very useful.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Philip Fitzsimons wrote:
curly brackets are shorthand - they tell the xsl processor to replace the contents with the result of the xpath xpresions
Wow, thanks for the awesome tip. Never seen this mentioned in any XSL tutorial before, is it part of the standard?
Paul Watson Bluegrass Cape Town, South Africa
Ray Cassick wrote:
Well I am not female, not gay and I am not Paul Watson
|
|
|
|
|
|
how do i restrict the values of an attribute to be any integer value EXCEPT 0?
for example:
<xsd:attribute name="id" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:integer" >
<xsd:minExclusion value="0"/> <!-- i>0 -->
<xsd:maxExclusion value="0"/> <!-- i<0 -->
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
this code does not work... how can i allow all values for integer EXCEPT zero?
thanks..
meng
|
|
|
|