|
|
Phil,
Thanks for posting the link, meanwhile i have done with XmlValidatingREader.
But surprisingly Newer version i.e. XMLReaderSettings is not catching any XML errors, that are caught by XmlValidatingReader.
Can you throw some light!!!!
REgards.
MaulikCE
|
|
|
|
|
Hi,
Sorry, I haven't started working with it yet. I'd merely made myself a note that XmlValidatingReader will have to be replaced when I move some existing code to v2.0
Good Luck
Phil Hobgen
barbari.co.uk
Southampton, UK
|
|
|
|
|
hey,
I have wrote an application. In this I get a XML-Stream witch is stored in LPSTR-Variable. Is the StreamSize very great (more than 500k), I get an exception during:
loadXML(LPSTR XMLStream)
//************ code *******************//
LPSTR XMLStream; //get from external programm
if(!XMLStream)
return E_FAIL;
IXMLDOMDocumentPtr pDOMDoc(__uuidof(DOMDocument));
pDOMDoc->put_async(VARIANT_FALSE);
//load XML-Stream
//this will cause the exception
varResult = pDOMDoc->loadXML((_bstr_t)(XMLStream));
if(VARIANT_FALSE == varResult)
{
//do somthing
}
else if(VARIANT_TRUE == varResult)
{
//do somthing
}
//*****************************************************//
Is it possible, that there is some troubleshooting with the Header-Identifier
"encoding="ISO-8859-1" ??????
Thanks
|
|
|
|
|
Could u possibly give me a better description of ur error or say the error message. Please chk for the well formedness or ur xml data. Most of the errors are caused becoz of the fact that the xml data or file does not contain well formed xml data and that the encoding sure is no big deal.
Regards Wilbur
|
|
|
|
|
Ive got an rather big problem...
While customers are editing there profiles there XML-files containing the mutations created.
(see code below)
///
/// Creates XML doc and sends it to remote system
///
/// <param name="objMelding" />
private void CreateAndSendXml(Werknemer objWerknemer)
{
const string tableName = "Werknemer";
string xmlFilePath;
string xmlpath;
//try
//{
System.Xml.XmlDocument doc = objWerknemer.CreateXml();
xmlpath = ConfigurationSettings.AppSettings["mailDir"];
if (File.Exists(xmlpath+"busy.txt"))
xmlpath=xmlpath + "ifbusy\\";
xmlFilePath = xmlpath + tableName +
DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() +
DateTime.Now.Minute.ToString() + DateTime.Now.Millisecond.ToString()+".xml";
//Delete xml file if it already exists
if ( File.Exists(xmlFilePath) )
File.Delete(xmlFilePath);
doc.Save(xmlFilePath);
//}
/*catch (Exception e)
{
Log.WriteEntry(new System.Exception("Fout bij schrijven XML\r\n"+e.Message));
throw new System.Exception("Kan XML bestand om wijzigingen te verzenden niet aanmaken, probeer later nog eens te verzenden");
}
*/
}
My problem is that WHEN there more than one customer editing at the EXACT same time one of the doubles are being deleted.
(see code below)
//Delete xml file if it already exists
if ( File.Exists(xmlFilePath) )
File.Delete(xmlFilePath);
doc.Save(xmlFilePath);
//}
/*catch (Exception e)
I want to make this XML-files more unique by adding an sessionid or userid to creationdate (see code below)
xmlFilePath = xmlpath + tableName +
DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() +
DateTime.Now.Minute.ToString() + DateTime.Now.Millisecond.ToString()+".xml";
It is here in this piece of code above i want to make an adjustment to set the SessionID or UserID to the String.
I just cant find the proper code to do this can someone help me????
The only thing i want is to prevent the XML-Files from beeing deleted!
You can mail me for an answer aswell by mailing: ferry@verzuimdata.nl
THANK YOU VERY MUCH
http://www.verzuimdata.nl
|
|
|
|
|
is'nt tha above code working for u ?. if not then let me know what's actually goin wrong using the above piece of code to create ur filename. if not gimme a better description of ur error or whatever the output is when using the above piece of code to generate a unique filename.
Regards Wilbur
|
|
|
|
|
Hello , iam a new vc++ programmer,
I want to creaet an xml file using mxxml3.0
I had used every possible way 2 do that , every time
the functionc
CreateProcessingInstruction
&
raw_CreateProcessingInstruction
are throughing the run time exception.
plz help me i am trying 4 that since last 6 days. any sugestion would be helpful.
any place 2 find the proper code rather than msdn ,
i don't want 2use wrapper class 4 this.
Rahul Agarwal
|
|
|
|
|
have u tried checking the well formedness of the xml file or xml data. please chk for the well formed ness of ur xml data and then try getting ur work done. I'm not sure as to whether u've done some exception handling stuff say like try..catch..finally n stuff. this would give u the correct output for ur error.
Regards Wilbur
|
|
|
|
|
Hi all.
WSE 2.0 on .Net 1.1 SP1, C#, Win XP Pro.
In a web service, I have a custom UsernameTokenManager, override AuthenticateToken, set up all the relevant stuff to make it use the WSE, but it never calls AuthenticateToken, simply fails on the standard default AuthenticateToken.
Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated or authorized at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.OnLogonUserFailed(UsernameToken token)
Am I missing anything simple?
My custom UsernameTokenManager:
[SecurityPermissionAttribute(SecurityAction.Demand, Flags=SecurityPermissionFlag.UnmanagedCode)]<br />
public class UsernameManager : UsernameTokenManager<br />
{<br />
protected override string AuthenticateToken(UsernameToken token)<br />
{<br />
if (token == null)<br />
throw new ArgumentNullException();<br />
return "password";<br />
}<br />
}<br />
In my web service web.config file I have
<microsoft.web.services2><br />
<diagnostics /><br />
<security><br />
<securityTokenManager type="WebServiceNamespace.UsernameManager, WebServiceDllName" xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext" qname="wsse:UsernameToken" /><br />
</security><br />
</microsoft.web.services2>
My proxy class for the service is derived from WebServicesClientProtocol.
In my call to the web service, I do this:
Myservice svc = new Myservice();<br />
UsernameToken tok = new UsernameToken("admin", "password", <br />
PasswordOption.SendPlainText);<br />
svc.RequestSoapContext.Security.Tokens.Add(tok);<br />
svc.AFunctiononTheService();
I guess its something simple that I'm missing, but I'm struggling to identify it!
Help!
|
|
|
|
|
hi!!!
Try changing your xmlns for this one :
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
bye
|
|
|
|
|
Thanks, that was spot on!
|
|
|
|
|
i m facing the Problem in inserting tabindex for column Header in data grid
Actually i want to move thr cursor on column header in data grid .
Help me.
Amit
|
|
|
|
|
I looking for a good beginners to advanced book on the XML/XSL. It should have thorough explanations and working examples (with ISBN numbers please). I'm intending using it either with Java or C#. Any comment on this?
Brendan
|
|
|
|
|
Hi,
I bought Wrox (Programmer to Programmer) Professional XML in the year 2000, and I would recomend it. I don't think it's available now but has been split into various versions aimed at Java, Apache, ASP, etc. I'm guessing that most of the content is much the same in the other books.
FYI the authors of my copy are:
Didier Martin, Mark Birbeck, Michael Kay, Brian Loesgen, Jon Pinnock, Steven Livingstone, Peter Stark, Kevin Williams, Richard Anderson, Stephen Mohr, David Baliles, Bruce Peat,Nikola Ozu.
I would think that anything with a combination of some of these authors would be good.
If you're doing XSLT then Michael Kay's book (Wrox) XSLT Programmers Reference is one of the best programmers books that I've ever come across.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
Can you maybe supply me the ISBN number of this book you mentioned?
What skills do you specialise in?
|
|
|
|
|
Brendan Vogt wrote:
Can you maybe supply me the ISBN number of this book you mentioned?
1-861003-11-0
I think it's out of print but still listed on Amazon (UK) as available "used and new" very cheaply. A few parts of the book will be outdated, unless there was a 2nd edition. An alternative might be Professional ASP.NET 1.0 XML with C# (1-861007-24-8), which has some of the same authors involved - but I haven't read it!
Brendan Vogt wrote:
What skills do you specialise in?
Delphi for Win32 apps and C# for Web & Windows Forms; + XML, SQL Server, etc.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
Is this (Professional XML) a good book for XML beginners?
Thanks
|
|
|
|
|
Guys,
I have been trying to transform and XML file using XSLT 1.0 but haven't been able to as i want to get the minimum value,abs. I tried using EXSLT but cannot get it running as i keep getting one or the other stupid errors. If possible please provide me with a sample if ur using the namespace http://exslt.org/dynamic or math or func or sumthing.
Thanx
regards
Wilbur
|
|
|
|
|
Hi,
I don't know about EXSLT but I remember performing an abs type operation by converting the number to a string using something like
format-number(value, "+#.##;-#.##")
then you can trim the leading + or - and convert back to a number.
It's a bit convoluted, but can be done.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
Hi!
I am using windows applications and I am trying to create a application config file.
I have created an app. config file thru add item and this is how it looks..
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="FilePath" value="C:\testConfig.xml" />
</appSettings>
</configuration>
And from my code I am accessing the config file soemthing like this
using System.Configuration;
string path = ConfigurationSettings.AppSettings("FilePath");
I am getting this error:
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll Only elements allowed
I would appreciate any insight
Thanks in advance
|
|
|
|
|
I'm using the Microsoft Communications API SDK to make SIP calls.
I then try to register with the Asterisk[^] registrar, however it never works. From the SDK documentation says I need to write an XML profile. I haven't managed to write one yet that works. Can anyone help please? TIA
Jerry
I feel like I'm diagonally parked in a parallel universe
Jerry Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
I see the syntax of msxsl.exe says -o for output. But I do not know how to apply it.
I would like to write a batch program that outputs the result to a file named week3result.xml. This is what I have
C:\XML_Class\msxsl.exe C:\XML_Class\week3\MomAndPop.xml C:\XML_Class\week3\order.xsl -o c:\xml class\week3\week3result.xml
Thank you.
Again I am looking for the correct syntax to direct the output from the screen to a file.
|
|
|
|
|
Hi,
You need quotes round the output filename, it's got a space in it.
Cheers
Phil Hobgen
Southampton, UK
|
|
|
|
|
i wrote a simple line of code that retrives a value from a static XML file but my problem that it returns diffrent result every time it runs, the line is:
string asd = VoteData.DocumentElement.ChildNodes[1].ChildNodes[1].InnerText;
maybe that happen coz the file is not completely loaded , i'm using C# but i don't found any method that let me know if the file is completely loaded or not, i know that theres a function in javascript which is : readyState that do the job, but i can't found any in C#, can anyone help ?
thanx in advance.
|
|
|
|