|
hello friends
i wanna make a dektop news ticker which rotates my personal news or message worldwide whenever that particular application is installed on any pc . DESKTOP NEWS TICKER by www.mioplant.com provides an easy way 2 build but i'm not getting that.
it uses some rss feeds and xml kind of fundas plz tell how to rotate the information which can be changed time 2 time anytime.
thanks
|
|
|
|
|
|
Firstly - note the forum title "XML/XSL" - I don't think your query is entirely appropriate for this forum?
Anyway - I would hope the answer is "you can't, no way, no how, without some helper software already installed on the PC" - sounds like a recipe for malware hell.
But of course, Microsoft have a solution of sorts - ClickOnce[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: Firstly - note the forum title "XML/XSL" - I don't think your query is entirely appropriate for this forum?
It was imho the Closest site I could find to HTML
Stuart Dootson wrote: Anyway - I would hope the answer is "you can't, no way, no how, without some helper software already installed on the PC" - sounds like a recipe for malware hell.
Well, as I own all the PC's on which to use this, (and as I also own the CPP Code that I want to run) installing helper software is no problem.
The Link was Usefull.
Thanks,
Bram van Kampen
|
|
|
|
|
Hi..
I am using a function to format the date values which are read from the XML document,but in XSLT while using the following coding i am receiveing only empty value in the DOB parameter.How can i solve the issue
xsl:value-of select="DateTimeConverter:ToDateTimeFormat(DOB, 'dd-MMM-
YYYY')"
DOB is the short form of Date of birth node below is the XML structure
< Name > Guest < /Name >
< DOB > 2009-06-12T02:00:47.187 < /DOB >
< Age > 25 < /Age >
while reading the DOB node i am reteriving only empty values how can i solve this
Mahesh.J
Thanks
Mahesh.J
|
|
|
|
|
Are you using the class from this page[^]? If so, have you tried the samples to verify that you've got the code installed such that it can be resolved by the XSLT engine?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I am using the class which is placed in the APP_Code folder
|
|
|
|
|
Mahesh.J wrote: the class
Which class? The one from the article I pointed you at?
Mahesh.J wrote: which is placed in the APP_Code folder
That's nice. Who put it there? You? Still doesn't answer the question I asked you; are you sure the XSLT processor can see the extension class?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: Still doesn't answer the question I asked you
At least you got a reply from this twit. He just deleted his post when I asked a question then reposted his question. At this point I wouldn't tell him sh*t.
|
|
|
|
|
led mike wrote: At this point I wouldn't tell him sh*t.
Rapidly approaching that point myself to be honest
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Sorry Guys, I thank you for ur reply.I found the problem myself and sloved the issue.Below is code that i used previously where i faced the problem
<xsl:for-each select="Customer//CustomerDetails">
<xsl:value-of select="DateTimeConverter:ToDateTimeFormat(Customer//CustomerDetails/DOB,'dd-MMM-yy')" />
</xsl:for-each>
Inside the for-each loop value for the DOB parameter is reterived as empty.
Then i solved the issue by using the msxsl function as shown below
<xsl:value-of select="msxsl:format-date(DOB, 'MMM dd, yyyy')" />
Regards
Mahesh.J
|
|
|
|
|
HI
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Probedata>
<Data>
<Key>10</Key>
<Cmd>1</Cmd>
<Coil1>2</Coil1>
<Coil2>0</Coil2>
<Program>False</Program>
<Line>0</Line>
</Data>
<Data>
<Key>20</Key>
<Cmd>2</Cmd>
<Coil1>4</Coil1>
<Coil2>0</Coil2>
<Program>False</Program>
<Line>4</Line>
</Data>
<Data>
<Key>30</Key>
<Cmd>3</Cmd>
<Coil1>2</Coil1>
<Coil2>5</Coil2>
<Program>False</Program>
<Line>1</Line>
</Data>
</Probedata>
This is my XML file and the program part to read xml below
xmlProbe.Load(probe.xml)
Dim xmlNodeList As Xml.XmlNodeList
xmlNodeList = .xmlProbe.SelectNode("Probedata")
For Each j As Xml.XmlNode In xmlNodeList
key = CInt(xmlPNode.ChildNodes(0).InnerText)
prg.Cmd = CInt(xmlPNode.ChildNodes(1).InnerText)
prg.Coil1 = CSng(xmlPNode.ChildNodes(2).InnerText)
prg.Coil2 = CSng(xmlPNode.ChildNodes(3).InnerText)
prg.Program = CBool(xmlPNode.ChildNodes(4).InnerText)
prg.Lines = CInt(xmlPNode.ChildNodes(5).InnerText)
DictProbeCyl.Item(key) = prg
Next
When I run it
the For loop , loop thru' 3 time, I put it into a dictionary
But it always read the last node. e.g. for all values, the key is 30
Can anyone help?
Thanks
|
|
|
|
|
It looks like you're referencing some other variable in your loop body, as opposed to your iterator variable. Shouldn't, for example, the first statement in your loop be:
key = CInt(j.ChildNodes(0).InnerText)
|
|
|
|
|
|
Hi all
My XML is like this
<Compare>
<columnNames>
<column>
<na>Name</na>
</column>
<column>
<na>Address</na>
</column>
<column>
<na>Phone</na>
</column>
</columnNames>
<Hotels>
<Hotel>
<Name>Hotel Mount View</Name>
<Address>123</Address>
<Phone>1234</Phone>
</Hotel>
<Hotel>
<Name>Hotel Mayur</Name>
<Address>Adress1</Address>
<Phone>12345678</Phone>
</Hotel>
</Hotels>
</Compare>
My requirement is that
the na items in column specify the name and count of the child items in Hotel.
I have written the xsl like this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<table>
<xsl:for-each select="Compare/columnNames/column">
<tr>
<xsl:variable name="ColName" select="na"></xsl:variable>
<td>
<xsl:value-of select="na"/>
</td>
<xsl:for-each select="Compare/Hotels/Hotel">
<td>
<xsl:value-of select="Name"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
but its showing the result properly.Need your help?
|
|
|
|
|
This XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<table>
<xsl:for-each select="Compare/columnNames/column">
<tr>
<xsl:variable name="ColName" select="na"></xsl:variable>
<td>
<xsl:value-of select="na"/>
</td>
<xsl:for-each select="///Compare/Hotels/Hotel">
<td>
<xsl:value-of select="./*[name()=$ColName]"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
produces this HTML fragment - is that what you were after?
<?xml version="1.0"?>
<table>
<tr>
<td>Name</td>
<td>Hotel Mount View</td>
<td>Hotel Mayur</td>
</tr>
<tr>
<td>Address</td>
<td>123</td>
<td>Adress1</td>
</tr>
<tr>
<td>Phone</td>
<td>1234</td>
<td>12345678</td>
</tr>
</table>
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
how do we skip root elements for sub classes when serailizing comlex object?
my requirement is
Assume we have a complex class
public class employee
{
private string _name;
private string empcode;
private list addresses;
//Assume we have created public properties also
}
public class Address
{
private string street;
private string city;
private string state;
//Assume we have created public properties also
}
if we serialize above employee collection class in XML the output would be
<employees>
<employee>
<name>ABC
<empcode>1/EmpCode>
<addresses>
<street>XXX
<city>xxx<city>
<state>yyy
<street>XXX
<city>xxx
<state>yyy
but i want the above xml as
<employees>
<employee>
<name>ABC
<empcode>1/EmpCode>
<street>XXX
<city>xxx<city>
<state>yyy
<street>XXX
<city>xxx
<state>yyy
i just removed <addresses> means removing root element for inner classes.
how do we achieve this using .NET
Thanks inadvance
Regards
Ravi
|
|
|
|
|
Can I suggest you select the 'Encode HTML tags when pasting' tickbox when pasting XML code into a post - most of your content has disappeared!
Also, it helps to put it in a code block, using the 'code block' link below when the code is selected.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hey, How to make menubar using XML code?
please give me any example code
|
|
|
|
|
paypony wrote: How to make menubar using XML code?
Given that XML's not an executable language and doesn't have any concept of a windowing system, good luck with that!
All you can use XML for is to describe the layout of the menu system, what commands each menu entry might raise, stuff like that. But it would still need to be translated into code that runs, or interpreted by some form of runtime system, in order that the menu is executed, the way that XAML is in WPF.
Or you could be wanting an XML menubar description for a web page?
Who knows? Oh yeah, you do. But you've not shared any of that detail with us, so guess what - we can't help you in any detail!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Just a hint for using CodeProject. When someone like Stuart replies to you, don't vote down their reply. If you don't like what they say just ignore it, otherwise vote favorably and thank them for the free help they gave you.
|
|
|
|
|
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
|
I have xml tags as below.
file1.xml
<Roles>
<Role>
<Permissions>Admin<Permissions/>
<Permissions>Reader<Permissions/>
</Role>
</Roles>
Here is my XSD to validate above xml
myXSD.xsd
<element name="Roles">
<complexType>
<sequence>
<element ref="Role">
</sequence>
</complexType>
</element>
<element name ="Role">
<complexType>
<sequence>
<element ref ="Permissions" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
</element>
<element name ="Permissions">
<complexType>
<sequence>
<element name ="Permission" type="string" />
</sequence/>
</complexType/>
</element/>
This XSD validation works fine in normal case. If I change the xml file as below.
file2.xml
<Roles>
<Role>
<Permissions>Admin<Permissions/>
<Permissions>Reader<Permissions/>
</Role>
<Permissions>Reader<Permissions/>
</Roles>
ie. I inserted the <Permissions> immediately after the <Roles> parent node. This is invalid in my case. I want to enforce that <Permissions> node always comes inside the <Role> node but not <Roles> node.
I want to detect this such case using XSD validation.
Could you please suggest me how to write the correct XSD schema to invalidate file2.xml?
Thanks in advance
Prakash
|
|
|
|