|
ok, i'll try it when I get home.
/\ |_ E X E GG
|
|
|
|
|
Wow, I can't believe I didn't think of that myselft...
that's just what I needed, thanks dude.
/\ |_ E X E GG
|
|
|
|
|
Wait, one more thing...
I have this programed saved in ...
C:\Inetpub\wwwroot\WebLog\Entries\bin
and it's working fine, but I need the .xml to be saved in....
C:\Inetpub\wwwroot\WebLog\Entries
How can I change the following to save the .xml file in the \Entries folder?
string fileName = DateTime.Now.ToString("yyyyMMdd_hhmm") + ".xml";<br />
XmlTextWriter writer = new XmlTextWriter(fileName, null);
/\ |_ E X E GG
|
|
|
|
|
Wait, nevermind... I figured it out myself...
string fileName = DateTime.Now.ToString("yyyyMMdd_hhmm") + ".xml";<br />
XmlTextWriter writer = new XmlTextWriter("C:/inetpub/wwwroot/weblog/entries/"+ fileName, null);
/\ |_ E X E GG
|
|
|
|
|
I have a xml file which has at the top but the file contains all printable ascii characters except one line.(This line is optional)
I am converting this file into html using xsl.
My xsl files top line is like this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
However, when this non-printable ascii character exists xslt conversion does not work. When it is absent it works.
I searched google but no luck. How can I solve this?
Orcun Colak
|
|
|
|
|
I have a weblog thing I made in C#, ASP.NET, it works fine and everthing and stores each entry into and .xml file. Now usually I edit and make new entrys though internet explorer, but then I though how cool would it be to make an application in C# to take the .xml file edit it in the program, then click the save button and have it update the .xml!
Does anybody have any tips or places to look, for help on this???
/\ |_ E X E GG
|
|
|
|
|
Hi,
I need process two nodelists. so I have to open two
XmlDocuments at the same time.
Why does this code crash?
string filename = "D:\test.xml";
XmlDocument doc = new XmlDocument();
doc.Load(filename);
XmlNodeList nl = doc.SelectNodes("TestSequence");
string filenameOpt = "D:\Options.xml";
XmlDocument docOpt = new XmlDocument();
docOpt.LoadXml(filename);
readXML(nl);
|
|
|
|
|
One thing that is wrong is that the filename strings are not properly escaped.
Try changing
string filename="D:\test.xml"
to
string filename=@"D:\test.xml"
or
string filename=@"D:\\test.xml"
You will also need to do the same for "D:\Options.xml"
"\t" will translate to a tab character, which will cause the load of the first document to fail as it can not find the file, or possibly that the filename is invalid.
Another problem is that when you are loading the second document you are using LoadXml and not Load. "D:\Options.xml" is not a valid xml string.
I have made both these mistakes far too many times myself
Regards
Mark Smithson
|
|
|
|
|
thanks for your fast help!!
but i made an incomplete request - sorry
you were of course right but my problem appears
after i load my 2nd XmlDocument (see now a completer version)
string filename = @"D:\test.xml";
XmlDocument doc = new XmlDocument();
doc.Load(filename);
XmlNodeList nl = doc.SelectNodes("TestSequence");
string filenameOpt = @"D:\Options.xml";
XmlDocument docOpt = new XmlDocument();
docOpt.Load(filenameOpt);
//crash
readXML(nl);
|
|
|
|
|
Have you made sure that the second document is valid xml? The best way to do this would be to load the document in internet explorer. You will get an error if the document is not valid.
What exception message are you getting when the code crashes? This can usually lead you to the source of the problem.
Regards
Mark Smithson
|
|
|
|
|
you are right again - the XML was not valid
thanks and regards
|
|
|
|
|
:-Oyou are right again - the XML was not valid
thanks and regards
|
|
|
|
|
in the web are too many tutorials about that, see this
GO TO[^]
(spanish)
Para seguir la trayectoria:
mira al maestro,
sigue al maestro,
camina junto con el maestro,
mira a través del maestro,
conviértete en el maestro
(this is a poor traduction)
To make you trayectory:
Look your master
Follow your master
walk whit your master
look across you master
become in your master
|
|
|
|
|
I have put off learning XML for as long as I could. I don't know why, I just did. Anyhow, everywhere I turn, there it is, so it's high time I get my butt in gear and read up on it.
Any suggestions on a good place to start? Books? Web sites (besides w3c - already started reading the spec)? CP articles?
[EDIT]
Web site: http://www.w3schools.com/[^]
[/EDIT]
Thanks,
Jon Sagara
They gave me penicillin because I have sniffilis.
-- A friend's response when asked why he went to the doctor
|
|
|
|
|
I've worked with XML a lot, but I've only read the XML Parser SDK. It also has info about XSL, but I'm finding that part a little hard to digest. So I'd be interested in both XML and XSL books/websites/etc. too, but especially about XSL.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
|
I am using Javascript, accessing a MSXML4.0 DOMDocument, in conjunction with a .XML and .XSL document. The .XSL document transforms the XML into a web page with a few forms, and a save button. There is javascript code to load the XML document into a DOM object on page load, modify the XML document in memory when the forms are modified, and save the DOM object when a button is pushed, but when I attempt to make a call to the DOM objects save(...) method, it throws a "Access Denied" javascript error. I have written a C++ app with a web browser control which does basically the same thing...browse to the file in the browser, open the file into a DOM (this time in C++, not JScript), and save the DOM in C++ and this works with no problem. Is there some sort of massaging I need to do to the filename, or some permissions I need to adjust to be able to save a file using the DOMDocument object in Javascript? Thanks in advance
|
|
|
|
|
Javascript running in IE is not allowed to access the file system of the local machine.
Why are you trying to save the document, is there another way you can get the same result?
Regards
Mark Smithson
|
|
|
|
|
I was writing an editor, using the XSLT bound to an XML document to generate a HTML form, which used Javascript to tie into a XML DOM. I wanted to be able to save, and I found a way using a FileSystemObject activex control, but I was just wondering why I couldnt save using the Javascript. Thanks
Jesse Rosalia
|
|
|
|
|
Hi CPians,
I need to convert Word docs and Excel to XML. The problem is that I need to do this in my ASP.NET application. I am not looking for an application that does this. I need information on how I can implement it myself.
I have been looking around but haven't found anything usefull.
Anyone has any idea?
any links ?
Thanx!
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
two solutions
1) get word to save the doc as html and convert that
2) use automation to generate an xml documnet directly.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I new about saving as HTML etc... and this is not good for me, but automation seems to be what I need.
It looks as if I have to spend some time on reading about automation, haven't used it before.
But I guess this is what soft. dev. is all about!!;P;P;P
Thanx!
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
In case you didn't know, html is a different thing than xml. Office Xp provides both xml and html support, for import and export. And these are different namespaces and file formats.
For instance, Excel XP outputs a spreadsheet to either .xml using the internal XML-SS file format, or the VML+MSO based .html web archive.
|
|
|
|
|
i guess thats why they are spelt different
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hopefully someone can help me...I'm creating this game...it's kind of like a create a story thing...and when the user clicks on a button it moves on to the next skit. Well, instead of moving onto the next skit, it's will keep playing the first skit. Does anyone know what actions have to be assigned?
email: candykid89@hotmail.com
AIM: BinaryBiotch
|
|
|
|