|
I have tried to create a generic xsl template to render any MSSQL FOR XML RAW query into a HTML table with adjustable paging and sorting. I have managed to find out how to do each part on its own but I can't put them all together.
Does anyone know how or has anyone seen anything like this before.
JJ
Trying like crazy.
|
|
|
|
|
Hi everyone
My program writes the content of a database in a XML file depending on the user request.
The first time there are no problem, but when i try to rewrite the file with the new content this message appear : WriteStartDocument must be the first call.
This is the code i use to open/close the file :
public void Rewrite()
{
xWriter.WriteStartDocument(false);
xWriter.Formatting = Formatting.Indented;
}
public void CloseFile()
{
xWriter.WriteEndDocument();
xWriter.Flush();
xWriter.Close();
}
I also tried to call the WriteStartDocument only if the file doesn't exist, but in this case the next time (after the file is closed) when some WriteElement instruction is executed the error message is : The writer is closed.
How can resolve this?
Thank you.
|
|
|
|
|
Hi ,
I have an RDL file that I want to view over the web.
The best solution I found is to write a compiler/interperter (RDL->HTML). This is doable but complicated. My question is : is there support for RDL in php,asp,jsp or any other web lang/script for viewing RDL with a browser?
or does anyone have some samples that deal with RDL format?
|
|
|
|
|
Hi code guys!
I've developed a service Logins.asmx. I works fine in local IIS. but when I copy required files to web server. I gives the download dailog (open or save).
Pls tell me how to publish webservice to Web Server.
Thanks.
Time is a good teacher but unfortunately it kills all his students
|
|
|
|
|
Sounds like you don't have IIS configured for ASMX files. That is ASP.NET right? If so you should try that forum you might get more response in there.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
You need to install ASP.NET on the IIS Server. For that, you will need the .NET Framework runtime installed on the machine. After you install it, go to the following folder in the server:
C:\WINDOWS\Microsoft.NET\Framework\<framework version="">
Then run the following command line tool with params:
aspnet_regiis.exe -i -enable
After tool runs, reboot...
ASP.NET will be properly configured on the server!
Hope this helps!
~javier
"I don't suffer from insanity, I enjoy every minute of it." -- Unknown
|
|
|
|
|
Im trying to do the following query on a view in access db:
"SELECT List Totals.Expr1,List Totals.Order ID FROM List Totals"
this is the view definition that i got from the db:
"SELECT Sum([Orders Detail].[Unit Price]*[Orders Detail].[Quantity]) AS Expr1, Orders.[Order ID]\r\nFROM Orders INNER JOIN [Orders Detail] ON Orders.[Order ID] = [Orders Detail].[Order ID]\r\nGROUP BY Orders.[Order ID];\r\n"
and i get syntax error missing operator in query expression List Totals.Expr1
how do i do this right?
|
|
|
|
|
What does this have to do with XML / XSL ?
I don't know if this is correct but in your posted View Definition SQL statement the schema entity names with spaces are delimited with brackets []. It seems likely that your query would have to do the same right?
On a side note I would recommend not using spaces in schemas.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
To All,
How do I extract the XML value where user has selected, and make comparison.
Q1. Are you using computer for web surfing? (Yes / No)
Q2. Are you going to play games and listening to music? (Yes / No)
Q3. Are you going to watch movies on the computer? (Yes / No)
If Q1 = Yes AND Q2 = Yes AND Q3 = Yes then
( PC - Need modem & speakers & CD-ROM drive )
------------------------------------------------------------------------
Please give me some suggestion?
Thanks....
Aaron
|
|
|
|
|
DotNet wrote:
How do I extract the XML
What XML?
DotNet wrote:
and make comparison
What are you comparing?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
To give you a better picture, this system is something like Sales Consultancy System which helps to advice or educate the customer to buy the (let's say, personal computer) according a sets of question they have answered. After that, the system will analyse from what the customer have selected and make a comparison on which computer model is likely the suitable one to display out the list of PC specification.
Here is the example:
Q1. What is your budget?
<pulldown -="" user="" to="" select="" the="" range=""> 2000 - 2500 , 2500 - 3000 , 3000 - 4000
"Click Next button"
Q2. Are you using computer for?
<user click="" on="" the="" checkbox="">
()- [games and listening to music]
()- [watch movies]
()- [Web surfing, online chatting]
"Click Next button"
After customer have answered this two questions, a list of PC specification will be listed out. This will show the customer which PC to buy.
|
|
|
|
|
It's entirly possible that I am totally dense but I don't beleive we can tell you how to "get the XML value" when you have not provided the XML. Also my exprience tells me we also should know your development platform, operating environment and what specific XML engine you are working with.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
It's just Microsoft Windows platform, using Microsoft Visual Studio.NET 2003, ASP.NET, XML. Below is the coding part, you can amend it.
----------------------------------------------------------------------
<consult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<beginnerchoice>
<question>What is your budget?
<answer>2000-2500
<answer>2500-3000
<answer>3000-3500
<answer>3500-4000
<beginnerchoice>
<question>Are you going to watch movies on the computer?
<answer>PC games and listening music
<answer>watch movies
<answer>Web surfing, online chatting
What is your advice?
Regards,
Aaron
|
|
|
|
|
Well if the use chooses answer number 2 for the first question in the following XML...
<?xml version="1.0" encoding="utf-8" ?>
<consult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<beginnerchoice>
<question>What is your budget?</question>
<answer>2000-2500</answer>
<answer>2500-3000</answer>
<answer>3000-3500</answer>
<answer>3500-4000</answer>
</beginnerchoice>
<beginnerchoice>
<question>Are you going to watch movies on the computer?</question>
<answer>PC games and listening music</answer>
<answer>watch movies</answer>
<answer>Web surfing, online chatting</answer>
</beginnerchoice>
</consult>
Then the XPath query to extract the value that they choose would be:
//beginnerchoice[1]/answer[2]/text()
Hope that helps
-pete
|
|
|
|
|
Hi all,
How can we query xml data between two dates by using XPath.
For example:
I have an XML file like this
"<Employees>
<Employee>
<Name>xxxx</Name>
<DateOfJoin>'2000-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>yyyy</Name>
<DateOfJoin>'2001-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>zzzz</Name>
<DateOfJoin>'2002-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>aaaa</Name>
<DateOfJoin>'2003-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>bbbb</Name>
<DateOfJoin>'2004-04-12T10:12:30'</DateOfJoin>
</Employee>
</Employees>"
Now I want employee names between 2002 and 2003.
Thanks inadvance.
|
|
|
|
|
Mr/Mrs Anonymous,
According to Microsoft(moc 2663) and www.W3.org(XPath link), only nodes, node, string, bool and number items might return. So if you want to query a date you might use XmlReader or derived class. If you want it with XPath, you should do it like this.
?* If you have better idea or sth better let me know.
------------------------------------------------------
...
DateTime dt;
string name = "";
XPathExpression expression = navigator.Compile(
"/Employees/Employee/Name | /Employees/Employee/DateOfJoin");
XPathNodeIterator i = navigator.Select(expression);
while(i.MoveNext())
{
if(i.Current.Name == "DateOfJoin")
{
dt = XmlConvert.ToDateTime(i.Current.Value);
if(2002< dt.Year && dt.Year < 2004)
{
//TODO
//tbx_msg.Text += name +"\r\n";
}
}
else
{
name = i.Current.Value;
}
}
|
|
|
|
|
Try the following XPath:
<br />
/Employees/Employee[substr(DateOfJoin,0,4) <= 2003 and substr(DateOfJoin,0,4) >= 2002]/Name<br />
If you are using XSLT, it will better to select the Employee node and do with it what you please
<br />
<xsl:apply-templates select="/Employees/Employee[substr(DateOfJoin,0,4) <= 2003 and substr(DateOfJoin,0,4) >= 2002]"/><br />
<br />
<xsl:template match="Employee"><br />
<!--More Rules--><br />
</xsl:template><br />
~javier lozano
(blog || email)
|
|
|
|
|
Hi all,
How can we query xml data between two dates by using XPath.
For example:
I have an XML file like this
<employees>
<employee>
<name>xxxx
<dateofjoin>'2000-04-12T10:12:30'
<employee>
<name>yyyy
<dateofjoin>'2001-04-12T10:12:30'
<employee>
<name>zzzz
<dateofjoin>'2002-04-12T10:12:30'
<employee>
<name>aaaa
<dateofjoin>'2003-04-12T10:12:30'
<employee>
<name>bbbb
<dateofjoin>'2004-04-12T10:12:30'
Now I want employee names between 2002 and 2003.
Thanks inadvance.
|
|
|
|
|
I have two XmlDocuments. One is default settings for a new user and the other is user specific settings. I want to merge the user specific settings over the default settings while keeping all of the default settings not specified in the user specific document. I've looked at using DataSet merging but it doesn't seem like the right answer. Anyone have any ideas?
|
|
|
|
|
Dear professionals
How can be syntax coloring applied to an XML document if it is to be loaded in a rich text box for user viewing?
|
|
|
|
|
If this is just for viewing the XML then just use a IE web browser control. You'll get the sweet IE formatting of XML.
|
|
|
|
|
Besides the given answer, you may use this tag.(It is working with IE.)
<iframe src="D:\w3home\www\TestXML\xmlDocs\sam.xml" width="400" height="400" scrolling="auto" frameborder="1"></iframe>
But if you want user to modify xml doc, you should write or find JavaScript code to do it.
|
|
|
|
|
Mr.mutlugokhan
Thanks for considering my problem and responding therein. Since the user should be provided to modify the xml doc, I need some javescript to accomplish that(as per your advice). Can you help me with some such code? Or if I can get some code like this, how woul I embed it in my c# code?
|
|
|
|
|
I will examine this project later but it seems to be ok for you.
http://www.codeproject.com/aspnet/TextEditControl.asp
|
|
|
|
|
Hi,
I just inherited code at my work which creats .asmx file on the fly. To make changes don't need to compile just stop iis make changes to XML file and when iis restart and by invoking web services it generates .asmx file.
My task was to add a method to that web service. I am able to see all my changes in web services ... logic is in store procedures that passed along with the other two required parameters.
I can invoke any other method from the webservice but the one I just created.. I can see the method description their... nothing is different in .asmx .... It asks for the parameters but when I invoke its gives me authentication fail error.
One more thing is... it's using SQLXML .... I m thinking t has to do with some sqlxml rights... but have no idea ... I m struggling from last 2 days... please.. Any help.. Any idea .. any suggestion are appreciated ...
thanks
|
|
|
|