|
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
|
|
|
|
|
What's the authentication error you are receiving? Also, could you show me a sample of the code?
Thanks!
~Javier
"I don't suffer from insanity, I enjoy every minute of it." -- Unknown
|
|
|
|
|
<employees xmlns="http://www.x.com">
<employee>
<fname>x<lname>y
when i run this line
XmlNode node = doc.SelectSingleNode("/employees/employee[lname='y']/fname");
node obj is null and it made me sick because XPath expr is right..
But, if i clear below part from xml doc, query runs properly.
xmlns="http://www.x.com"
What is wrong?
Any idea..
GMtl
|
|
|
|
|
Is the XML doc available on a Web site so we can see access it?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I found my mistake. I didnot write xpath expr correctly.
private string FindNode(string expr)
{
//load xml doc
doc.Load(rootPath + "sam.xml");
//specify default namespace
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
nsmgr.AddNamespace("x", "http://www.GMtl.com");
//xpath expression
string xpath_expr = "/x:employees/x:employee[x:lname='y']/x:fname";
//get to node and read inner text
XmlNode x = doc.SelectSingleNode(xpath_expr, nsmgr);
string retval = x.InnerText;
return str;
}
-------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<employees xmlns='http://www.xy.com'>
<employee>
<fname> x </fname>
<lname> y </name>
</employee>
</employees>
|
|
|
|
|
Don't you just need to change [lname='y'] to [@lname='y'] ?
|
|
|
|
|
No, I do not. Because lname is not an atribute. The code given with my previous message was correct and it is working. In short, if you have xml doc with namespace, define namespace in code and then specify namespace in the XPath expression.
|
|
|
|
|
Can any one help I reading it a XMLstring form a web service, it read in as a XmlElement.
The Xmlstring is a dataset, How can I get the XmlString in the XmlElement in to a dataset
|
|
|
|
|
DataSet.ReadXml(XmlElement.InnerText)
|
|
|
|
|
Use an System.Xml.XmlNodeReader to read the data into the set
Example:
XmlNodeReader reader = new XmlNodeReader(<xmlelementobject>);
DataSet ds = new DataSet();
ds.ReadXml(reader);
reader.Close();
This should work!
~Javier
"I don't suffer from insanity, I enjoy every minute of it." -- Unknown
|
|
|
|
|
hi all,
i want to convert a word doc to xml format. does anyone have
any advice or code snippets to help me get started.
TIA
CocciaStella
|
|
|
|
|
hi,
At first I did not understand what you had asked, but after a quick search I have come accross these two links. I hope they would be helpful for you.
http://www.msdn.microsoft.com/office/understanding/word/codesamples/default.aspx?pull=/library/en-us/dnword2k/html/odc_expwordtoxml.asp
http://www.msdn.microsoft.com/office/understanding/word/codesamples/default.aspx?pull=/library/en-us/odc_vsto2003_ta/html/wordobject.asp
By the way I saw a site which gives demo project but I cant remember now. It deserves to be examined. Search it. (If I could remember the name, I will let you know)
|
|
|
|
|
when i updat the dataset from he emulator even though i use the writeXml it still doesnt change the actual xml file on my hard disk......as in: it doesnt save the changes made while the emulator is running.
any ideas how it can be done?
|
|
|
|
|
I have recently started working with SAML as one of our suppliers uses this standard to manage security.
As far as I am aware (with my 2 days experience in this language) SAML follows the same structure standards as XML. So if a element has a value that contains a special entity (i.e. &, <, >, ', ") it should be encoded using XML standards, for example
<element>This & That</element>
should be :
<element>This &*amp; That</element>
(ingnore the * I put above, this was needed to prevent the browser rendering a &
Can anybody tell me if I am right or wrong on this one, I am more than happy to eat humble pie but I need to know one way or the other.
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
I am using SOAP 3 in Visual C++ 6 with the low-level calls.
I see that it defaults the Content-Type in the HTTP Header to 'application/dime'.
I am new to SOAP and I am wondering if you can change this value?
|
|
|
|
|
I am trying to transform an XML file using XSLT. in My XSLT file I have
omit-xml-declaration="yes"
This works execpt when I run it using a VbScript. When I load the xml file the Dom addes the declaration and it comes out the other side. How can I tell the DOm not to add it?
Thanks
|
|
|
|
|
Hi,
I've got an amazing problem... I've done a .Net solution for Pocket PC where I load an XML file, I put its content into a dataset.. normal stuff.. and then I want to write things into it : I naturally put :
FileStream fs = new FileStream(file,FileMode.OpenOrCreate); // filename
XmlTextWriter xtw = new XmlTextWriter(fs, Encoding.Unicode);
ds.WriteXml(xtw, XmlWriteMode.IgnoreSchema);
xtw.Close();
fs.Close();
(I want to use Unicode)
but when I want to read the XML file again I have an error : there's a chinese line at the end of the document!! so I copy the downloaded XML file from the pocket PC, and I see that the "encoding" has been changed to "utf-8"..
do you know how to fix this pb? thanx!
|
|
|
|
|
Dear CPians,
(I am using ASP not ASP.NET)
I use a Stored Procedure to get a recordset.
I convert this recordset into an XML Document using the XMLDOM object through a FUnction that I have made.
I the use an XSLT Ducment to generate HTML.
One of the fields in the recordset is an NTEXT field that contains HTML code. When I transform the XML with the XSL the HTML code of that gield is removed.
When I put the HMTL code within the XML Element into CDATA type and I view the page in the browser, I see the acuall HTML code.
Any ideas?
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Being able to see you xslt document would help, but at a guess I would say that you do not have a matching template for the html nodes, so they are not being copied into the output document.
|
|
|
|
|
Suppose I have login page with Email id and password.
In one page I want to put the email and password in the center of the page, and in another page I want to put the email and password in left side of the page.
Can I create this page in XML. This XML file I want to include into my HTML pages. In turn I want to use this page in ASP.NET
Padmavathi
|
|
|
|
|
Hi,
You could create a Web User Control in ASP.NET, then place the user control wherever on the screen you wish the "email/password" control to appear.
Hope this helps,
Andy
|
|
|
|
|
Hello,
Is it possible for ASP Classic to use SOAP to access a .NET web service directly?
I have an existing web application in ASP Classic and I am wanting to move to(or create the next version in) ASP.NET and Web Services, but I will need to also allow my existing application to access my new web services. Any suggestions or articles would be greatly appreciated.
|
|
|
|
|
Hi,
Check out Yuen Chiu So article "ASP.NET Web Service" [^].
NOTE: If you go down the Msxml2.XMLHTTP route you should use Msxml2.ServerXMLHTTP.4.0 as your client is a server process (IIS/ASP). Naturally you must have msxml4 install on the web server.
Here's some comments from Microsoft:
The ServerXMLHTTP object offers functionality similar to that of the XMLHTTP object. Unlike XMLHTTP , however, the ServerXMLHTTP object does not rely on the WinInet control for HTTP access to remote XML documents. ServerXMLHTTP uses a new HTTP client stack. Designed for server applications, this server-safe subset of WinInet offers the following advantages:
- Reliability — The HTTP client stack offers longer uptimes. WinInet features that are not critical for server applications, such as URL caching, auto-discovery of proxy servers, HTTP/1.1 chunking, offline support, and support for Gopher and FTP protocols are not included in the new HTTP subset.
- Security — The HTTP client stack does not allow a user-specific state to be shared with another user's session.
ServerXMLHTTP provides support for client certificates.
Note For more information about the limitations of the WinInet control, see >WinInet Limits Connections Per Server.
Hope this helps,
Andy
|
|
|
|