|
In VS2008, the XSLT debug is done using .Net parser (default). Is it possible to configure it to use MSXML4 or MSXML6 parser instead, the one that IE uses?
Regards,
ML
|
|
|
|
|
How can i read that XML Scheme using C# .NET 2.0?
XML Document:
<?xml version="1.0" encoding="utf-8"?><br />
<mirror path="C:\folder"><br />
<filter sub="1">*.mp3</filter><br />
<filter sub="1">*.wav</filter><br />
<filter sub="0">*.ogg</filter><br />
<filter sub="1">*.mp4</filter><br />
<filter sub="0">*.wmv</filter><br />
</mirror>
i tryed many ways but i cant put this working
xml can have more than 1 <mirror> element, also i need read atributes
thanks
|
|
|
|
|
Look at some of the previous threads just below. In several I recommend a site that has good tutorials and references.
|
|
|
|
|
I am transforming one xml into another in such a way that nodes are excluded (deleted) till attribute matches with value of user defined parameter .
ANy help on this is appriciated.
|
|
|
|
|
sonukadole wrote: ANy help on this is appriciated.
Try asking an actual question. Be specific and provide information that we might need to help you. We are not with you so we can't see and know what you are doing and working with unless you tell us.
|
|
|
|
|
<xsl:for-each select="Order/Shopping">
Voucher No: <xsl:value-of select="Voucher"/>
Name: <xsl:value-of select="Name"/>
<xsl:for-each select="/Order/Product[ProductID = XXXXXXXXXX]">
Product: <xsl:value-of select="ProductName"/>
</xsl:for-each>
</xsl:for-each>
I want to show Order/Shopping and /Order/Product/ which Order/Shopping/ID == /Order/Product/ProductID
XXXXXXXXXX is current Order/Shopping[ID] value.
How can I get current ID node value in for-each statement?
What is XXXXXXXXXX value in this example?
Best Regards...
|
|
|
|
|
I solve my problem;
I write this code top of the page and under <xsl:stylesheet xm...> tag;
<xsl:key name="unique-orders" match="Order/Shopping/ID" use="." />
First for-each statement
<xsl:for-each select="Order/Shopping/ID[generate-id() = generate-id(key('unique-orders', .))]">
Second for-each statement
<xsl:for-each select="/Order/Product[ProductID = current()]">
|
|
|
|
|
Hello everyone =]
I have xml file that contains messages I insert into MSMQ. I use XSD to validate the messages, but as expected, validation fails if any of the messages is not in the correct format, this way I lose the other valid messages.
I need to work out a way to validate only one message each time and handle it in the application level. I thought about looping through all the elements in the xml and creating a new document for each message and validating it alone, but I thought I'd ask first if you guys have any other and better solutions.
Thanks in advance =]
|
|
|
|
|
Welcome to Code Project
What XML library are you using? Other development platform information that might be needed to help you should also be supplied.
|
|
|
|
|
Ok, some progress.
I loaded the xml, used GetElementsByTagName to find the messages nodes and iterated through each node.
My problem is that GetElementsByTagName automatically adds to each node "xmlns" attribute, which makes problems later with deserialization since the automatically generated class does not contain the xmlns attribute. :S
How do I prevent it from automatically showing up in each of the nodes?
|
|
|
|
|
Hello again. If you don't respond to people posting replies to your questions, you won't often receive help from people on this site. You are asking yet another question and we still don't know any information about your development and runtime platforms and which XML library you are using. Shall we try this again?
|
|
|
|
|
Hi, can anyone help with me this as I'm relatively new with XML programming. I have code that's running perfectly in IE 7 but I'm no able to run it in other browser say Mozilla Firefox 3.0. Could you please let me know the equivalent code for transformation of XML document. I have pasted the code I have used for IE 7. Please help!!!
Home.xsl:
<xsl:template match="root/HOMEPAGE" xmlns:xsl="#unknown">
TEST
</xsl:template>
Home.xml :
<root>
<homepage>
<detail></detail>
</homepage>
</root>
Here is the code which has been used for I.E I want an equivalent code for Mozilla etc
var objXMLHome = new ActiveXObject("Msxml2.DOMDocument");
objXMLHome.async = false;
objXMLHome.resolveExternals = false;
objXMLHome.setProperty("SelectionLanguage", "XPath")
objXMLHome.load("XML/Home.xml");
var objXSLHome = new ActiveXObject("Microsoft.XMLDOM")
objXSLHome.async = false
objXSLHome.load("XSL/Home.xsl");
document.all("divHEADER").innerHTML = objXMLHome.selectSingleNode("//HOMEPAGE").transformNode(objXSLHome.documentElement);
|
|
|
|
|
rustyamigo wrote: Mozilla Firefox 3.0. Could you please let me know the equivalent code for transformation of XML document.
Sure, see if this[^] helps
Good luck
|
|
|
|
|
I'm completelly new to XML/XSL so bare with me.
I'm trying to use different colors within the same node...
In the following example:
__________________________________________________
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<example>
<title> This is the title </title>
<text>
This is a sample text.
I want to make next word <g>GREEN<g>
I want to make this one <r>RED<r>
</text>
</example>
_____________________________________________________________
What should style.xsl be so that the word "GREEN" appears green and same with "RED" once I open it with the browser?
Is there an easier way to code the XML in order to achieve that?
Thanks!
|
|
|
|
|
Ok...
I found the answer to my own question(below), but can I achieve the same result some other way, so I don't have to create nodes for it?
It is very time consuming to edit the text in that manner...
Thanks again!
________________________________
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="r">
<font color="red"><xsl:apply-templates/></font>
</xsl:template>
<xsl:template match="g">
<font color="green"><xsl:apply-templates/></font>
</xsl:template>
</xsl:stylesheet>
____________________________________
|
|
|
|
|
Can a wepapplication has more than one web.config file.I have two web.config files in my application.Now i want to make connection with the second web.config file.how can i do that.
Please answer
|
|
|
|
|
while sending Xml file over geeting the error
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Cannot have a DOCTYPE declaration outside of a prolog. Error processing resource 'http://localhost:2657/gridviewexcel1/Defa...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&...
please give the sol
|
|
|
|
|
Member 3784412 wrote: while sending Xml file over geeting the error
That does not mean anything in english. Perhaps you need help with translation when writing your post.
|
|
|
|
|
hi i have to create an xml file and in that file the number of child elements vary during the run time that is i have to insert different options and my xml file should looklike this
<options>
<option>
<optionid>1<\optionid>
<flag> true<\flag>
<optionname>....<\optionname>
<option>
<option>
<optionid>2<\optionid>
<flag> false<\flag>
<optionname>....<\optionname>
.
.
.
<options>
the options will be given by me from the ui during the run time so i can give as many options as i can so the number of options are varying in this case how can i create the xmldocument for this </options></optionname></flag></optionid></option></option></optionname></flag></optionid></option></options>
|
|
|
|
|
pavan ravipati wrote: how can i create the xmldocument
Define more specifically what you mean by "the xmldocument".
|
|
|
|
|
I have an XML file:
<root>
<foo>
<!--Content Here-->
</foo>
</root>
Now I want generate an HTML file from it. The HTML has two vertical frames. The left one displays the treeview of the XML file. And I want the right one display content of the tree view: when I click on the "foo" node, the content will be displayed on the right.
Now I have written an XSL file to get a treeview:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" />
<xsl:template match="/">
<html>
<head>
<!-- Some JS code to deal with the "expand", "collapse"... sth like these-->
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a onclick="toggle(this)"><img src="plus.gif" /><img src="folder.gif" />root</a>
<div style="display:none;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15"></td>
<td>
<a><img src="page.gif" />Foo</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
An HTML file which has:
<html>
<head>
<script language="javascript">
function populateFrames(){
var x = new ActiveXObject("Microsoft.XMLDOM");
var s = new ActiveXObject("Microsoft.XMLDOM");
x.async = false
s.async = false
x.load("source.xml");
s.load("tree.xsl");
var html = x.transformNode(s);
var destination = document.frames("header").document.open("text/html","replace");
destination.write(html);
}
</script>
</head>
<frameset onload="populateFrames()" cols="25%,*">
<frame name="header" scrolling="auto" target="main" />
<frame name="main" />
</frameset>
</html>
As you can see, the tree will display in the "header" frame, and I want the content in the "main" frame.
Could anyone tell me how to do this? It's very urgent: I'm waiting on line. Thanks very much for your help.
modified on Wednesday, March 11, 2009 1:03 PM
<div class="ForumMod">modified on Wednesday, March 11, 2009 1:06 PM</div>
|
|
|
|
|
Whats the use of static Monitor in threads?
|
|
|
|
|
Ok so im new to XML importing with visual basic 6. I do a little programming on the side. So heres my question. I need to Import a specific Variable off of a bare xml webpage and need help figuring up the code. Im going to use a database of items with a unique Item id to get the exact page but i need to know how to extract a specific value off the automatically generated page.
For example when i click the update button in my program it will build the url string, then connect to the net to the specific page grab the value needed and move onto the next id number.
The generated pages will all look the same except for the values in the generated page will change and the only part of the url that will change is the item id number
I.E. http://eve-central.com/api/marketstat?typeid=34
http://eve-central.com/api/marketstat?typeid=35 etc. etc
Now the specific value im interested in is the median value under the buy group of the page.
!!! Any code or simple tutorials on the subject are GREATLY APPRECIATED !!!
Krieath
|
|
|
|
|
One often used method of working with XML in a Microsoft environment is to use the MSXML ActiveX object. To learn how to use MSXML and all the XML technologies associated with your problem I suggest you start looking at some of the tutorials at www.w3schools.com
|
|
|
|
|
I am new to XML. I have tried to search for an answer to this question but haven't found any good answers.
I have created an XSD that describes a programming language (in this case C).
I have created a simple XML file that describes a simplistic hello world type program.
I have created a XSLT file that will transform that XML file into a c program.
What I would like to do is transform the XML and save the output a text or more specifically my .c file. Then I should be able to create another XSLT that would generate my .h file.
<xsl:output method="text" /> in my XSLT file.
When I load the XML file in IExplorer, the output is text on the screen, and I can copy and paste the text into a text file, but when I save as in IE it saves the original untransformed XML.
Is there a way to save the transformed output? Do I need to transform it outside of a browser somehow?
|
|
|
|