|
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
|
|
|
|
|
wrong section.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hi,
Can i split a huge class in C# to multiple files
Thank you
Regards,
Ajith
|
|
|
|
|
Hi
I am having problems outputing XML data in IE5.0. The XML data is written to a Session variable and has an XSLT stylesheet linked to it and I then use Response.Write to output the final sheet of data.
The problem is that the data within the XML file is not showing but the layout specifcied in the XSLT file is showing fine, so its liek an empty form.
In IE6 the sheet of data shows up perfectly.
I was wondering if the IE5's XML parser was rather different to the one in IE6 which causes this problem or if it was some other problem.
Amy help at all on shedding light on this would be really great
Cheers
John
|
|
|
|
|
IE5.5 and IE6 have different XSLT engines.
|
|
|
|
|
In the XSL file, the following syntax is used:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
However, in the XML file, the following syntax is used:
<?xml-stylesheet type="text/xsl" href="C:\test\MyStyleSheet.xsl"?>
In the XSL file, it’s a colon after ‘xml’, in the XML file, it’s a dash. Why is this? (xsl:stylesheet versus xml-stylesheet)
Internet Explorer can handle a colon or a dash in the XML, and transforms the XML correctly into the browser window but .NET only accepts a dash when parsing XML in code. Also, .NET only accepts the http://www.w3.org/1999/XSL/Transform namespace, and not the older http://www.w3.org/TR/WD-xsl namespace.
Am I right with these assumptions?
Thanks,
John.
|
|
|
|
|
Two different things, one is a processing instruction with target "xml-stylesheet", the other is a start tag with name "stylesheet" which is in namespace "xsl".
|
|
|
|
|
Thanks
|
|
|
|
|
(Also crossposted to ASP.NET)
I have an XML file which has the XSL file specified in the first line:
<?xml:stylesheet type="text/xsl" href="C:\test\MyXSLFile.xsl"?>
<Root xmlns:HTML="http://www.w3.org/Profiles/XHTML-transitional">
<Parameters>
<AgreementID>1380852</AgreementID>
…. And the rest of the XML data follows ….
I need to transform and output this as HTML. How can this be achieved in ASP.NET / VB.NET ? I have tried using the xmlTransform class, but it doesn’t seem to like the XSL reference embedded in the XML file. E.g:
Dim myXslTransform As XslTransform
Dim myXPathDocument As XPathDocument
myXPathDocument = New XPathDocument("C:\test\test99.xml")
myXslTransform = New XslTransform()
' myXslTransform.Load("") 'I don't have a separate .XSL stylesheet...
Dim stWrite As System.IO.StringWriter = New System.IO.StringWriter()
myXslTransform.Transform(myXPathDocument, Nothing, stWrite)
Response.Write(stWrite.ToString)
Gives the following error:
'xml:stylesheet' is an invalid name for a processing instruction. Line 1, position 3.
Changing the first line of the XML file to read <?xml-stylesheet ... > (dash instead of colon) gets rid of this error, but then I no longer have the XSL link, and it just outputs ‘raw’ XML!
My end goal is to be able to read in multiple XML files in this format and output them to ONE browser page as HTML. Without having to load the XSL seperately. I mean, the XSL already ref'd in the XML, so I should surely be able to send it to the browser directly as HTML
Any help is much appreciated.
John.
|
|
|
|