|
i just checked the XML file and there is no problem with the spaces.the code in file is:
<?xml version="1.0" ?> <br />
<employee_db />
now can u tell me the problem with the code???
|
|
|
|
|
No, you haven't given me enough information to diagnose your problem. Also, your original question is missing?
Now, can you give me more information and more code?
|
|
|
|
|
Hi I am tring to read a xml in vs2005
I sent a post a few days ago and was hoping to revist the problem with the small pregress I have made.
here is the vb.net code:
Dim ds As New DataSet
ds.ReadXml(xmlout)
ds.WriteXml("C:\Query.xml")
here is the xml doc i am reading:
<?xml version="1.0" encoding="Windows-1252"?>
<InvQuery Language='05' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='6.0.015'>
etc
my code keeps raising the following exception: "illegal characters in path"
I have noticed when I remove the attributes in the below line to just:
<InvQuery>
The code executes just as it should can anyone help with this problem pleeze =)
Cheers Dom
|
|
|
|
|
Just a guess, did you try changing the SingleQuote characters delimiting attribute values to DoubleQuote characters?
led mike
|
|
|
|
|
System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\Query.xml");
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(sr);
ds.ReadXml(xtr);
ds.WriteXml("Querytest.xml");
I have done this with your XML and it works perfectly.
|
|
|
|
|
|
Hi all.
I exported an excel file with 29 coloums as a xml spreadsheet, this I want to import into my C# app.
basic structure that it I'm going to use is
<row>
<cell><Data ss:Type="Number">1</Data></cell>
<cell><Data ss:Type="String">SomeData</Data></cell>
<cell ss:Index="4"><Data ss:Type="String">MoreData</Data></cell>
</row>
No, column 3 was blank, so it gave me the Index of the next xml entry. Want I want to know is...
The attribute of the cell, is it just "Index" or is it "ss:Index" ????
Thanx in advance
-- modified at 5:47 Tuesday 3rd October, 2006
He who laughs last is a bit on the slow side
|
|
|
|
|
The "ss" of "ss:Index" is the namespace as defined in document element:
<br />
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"<br />
xmlns:o="urn:schemas-microsoft-com:office:office"<br />
xmlns:x="urn:schemas-microsoft-com:office:excel"<br />
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"<br />
xmlns:html="http://www.w3.org/TR/REC-html40"><br />
...<br />
</Workbook><br />
Also, "ss" is the default namespace of the XML document. You have to account for this namespace before you can access the "Index" attribute via a program, XPath or XSLT.
|
|
|
|
|
Thanks for the quick reply, looks like I need to first sharpen my xml knowledge (alot)
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi all,
How can i set a path in the xml file and use it in the xsl style sheet?
example: the path could be "C:\image.jpg"
I want to be able to set the path in the xml file because this file gets created by our program and the user can change the path, that is why i dont want to do it as followed: <fo:external-graphic src="c:\image.jpg"/> this is a part from my xsl file but i cant use it like this any more...
thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Kindly help me in my peoject
#sanroop#
|
|
|
|
|
To do what, exactly?
Steve S
Developer for hire
|
|
|
|
|
Hello all,
I have an XML whick has the details regarding the function names and parameters. I'll have to display the details in a table format. The sample XML and table format required are given below:
XML Format:
<Result>
<IOParameters>
<Inputs>
<Parameter>
<ParameterName>input</ParameterName>
<Value>value</Value>
<Unit>unit</Unit>
</Parameter>
<Parameter>
<ParameterName>input</ParameterName>
<Value>value</Value>
</Parameter>
</Inputs>
<Outputs>
<Parameter>
<ParameterName>sdg</ParameterName>
<Value>sdg</Value>
<Unit>sdg</Unit>
<ToleranceHigh>sg</ToleranceHigh>
<ToleranceLow>sgd</ToleranceLow>
</Parameter>
<Parameter>
<ParameterName>sdg</ParameterName>
<Value>sdg</Value>
<ToleranceHigh>sg</ToleranceHigh>
<ToleranceLow>sgd</ToleranceLow>
</Parameter>
<Parameter>
<ParameterName>sdg</ParameterName>
<Value>sdg</Value>
<Unit>sdg</Unit>
</Parameter>
</Outputs>
</IOParameters>
<Error>
<ErrorDescription>sdg</ErrorDescription>
</Error>
</Result>
TABLE FORMAT:
__________________________________________________________________
Function Name Results
____________________________________________________
Input Name Value Unit Low High
/Output Limit Limit
___________________________________________________________________
Samp1 Output Abc 786 - - -
___________________________________________________________________
Samp2 Input Xyz 909 M 10 100
_____________________________________________________
Input Pqr 9899 X - -
_____________________________________________________
Output Zzz 8899 - - -
___________________________________________________________________
The number of input and output parameters for every function may vary.
Please help me out in generating the XSL for this XML. I had tried it out but am not able to align them properly. I want the table width to be 100% and not more than that.
Thanks in advance.
Madhu
|
|
|
|
|
I have created a web service on our server. The client created an application to send us some information in a SOAP header. We process this information and return some values back to them. This is working fine, but we wanted to capture the client's server IP address when we record our logins. Using Request.UserHostAddress will capture the IP address from the client's computer, not from the their web server. Is this possible to do? Or would they need to pass it through a SOAP Header.
|
|
|
|
|
dove11 wrote: I have created a web service on our server.
What environment are you in? In .NET you can use System.Net.XXXX to obtain the machines hostname and IP. If in C++ you can use the sockets API.
led mike
|
|
|
|
|
Hi Mike. Thanks for replying. I am using Microsoft Development Environment 2003 Version 7.1.3088, Microsoft .NET Framework 1.1 Version 1.1.4322 SP1, Microsoft Visual Basic .NET, ASP .NET.
Marcy
|
|
|
|
|
using System.Net;
System.Net.IPHostEntry hostent = Dns.GetHostEntry("localhost");
foreach (IPAddress addr in hostent.AddressList)
{
Debug.WriteLine(String.Format("{0}:{1}", addr.Address, addr.ToString()));
}
led mike
|
|
|
|
|
Thanks Mike. I will try that. The server IP address I am trying to capture is a client's. This client is using our web service. We want to allow only a certain range of IP addresses access to the web service.
Marcy
|
|
|
|
|
dove11 wrote: The server IP address I am trying to capture is a client's.
That is new information and not what I gave you. From your perspective the Server "is" a client. The client IP is in the HTTP Header. However the server is likely behind a firewall in which case you will only get the firewalls IP and there is nothing you can do to see behind the firewall.
dove11 wrote: We want to allow only a certain range of IP addresses access to the web service.
This is likely based "per company"? If so the firewall IP should work fine for you.
http://msdn2.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.aspx[^]
dove11 wrote: but we wanted to capture the client's server IP address
I missed that... my bad. In the future post ASP.NET questions in the ASP.NET forum[^], this would have been answered in about 10 minutes over there.
led mike
|
|
|
|
|
Sorry, I wasn't sure, since it was regarding a web service and SOAP Header. I thought it would go in the XML forum. Thanks for the information. I really appreciate it.
|
|
|
|
|
Hi,
can I use a variable in xmlns?
like -> <xsl:stylesheet version="1.0" xmlns:foo="$var">
Thanks
|
|
|
|
|
|
I would say no! The variable would have to be declared before the xsl:stylsheet element which would not be in the scope of the stylesheet. However, you can create a stylesheet with a stylesheet, and, then, you can have variable content in the stylesheet element. By the way, the proper way to embedded a variable value in an attribute is:
<foo value="{$var}"/>
George
|
|
|
|
|
sorry, ignore my post. I did not read the question correctly.
led mike
|
|
|
|
|
, I have been doing that same thing a lot lately. However, I thought your post was useful.
|
|
|
|