|
I would like to learn about how to load attributes from a tag from a *.xml to a dropdownlist in HTML file. When I choose an item in this list, the page will sort and show only items in the xml file that related to that attribute.
Can any body help?
Thanks a lot
-------*------
Learn every day...
|
|
|
|
|
What version of MSXML can be used in Windows NT.
I am using this code for XP, using MSXML2.dll it working
<br />
TESTHR(CoInitialize(NULL)); <br />
TESTHR(docPtr.CreateInstance(TEXT("Msxml2.DOMDocument.3.0")));<br />
<br />
_variant_t varXml((_bstr_t)p_xmlFileName.c_str());<br />
_variant_t varOut((bool)TRUE);
But in NT this is not working. What shall I do?
What "Msxml2.DOMDocument.3.0" should it be?
Pradosh
|
|
|
|
|
Pradosh Tapan Datta wrote: What version of MSXML can be used in Windows NT.
What version[^] is installed?
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
Hi all.
Some time before i pass to use VS 2005.But there is one problem.When i edit an xsd file, intelliscensy work not how in VS 7. So three elements appear every time when i begin typed new element (
|
|
|
|
|
Hi,
I have a problem getting the first and second node from a specific xmlnodelist, and display it.
Basically my xml file looks like this
<br />
'Tag means that there is an xml tag<br />
Tag CompanyList:<br />
Tag PrincipalDetail:<br />
Tag Name: John<br />
Tag Surname: Doe<br />
Tag Telephone: 0000<br />
Tag AddressLine: streets<br />
<br />
<br />
Here is my asp.net code<br />
<br />
<code><br />
Dim xmlDoc As XmlDocument = New XmlDocument<br />
xmlDoc.Load("c:\Company.xml")<br />
<br />
'Dim elem As XmlNode = xmlDoc.DocumentElement("PrincipalDetail")<br />
Dim elemList As XmlNodeList = xmlDoc.SelectNodes("/CompanyList/PrincipalDetail")<br />
Dim elem As XmlNode<br />
<br />
Dim nodeLength As Integer = elemList.Count<br />
Dim i As Integer<br />
Dim isValid As Boolean = False<br />
<br />
For i = 0 To nodeLength - 1<br />
If elemList.Count > 0 Then<br />
strInsertXMLToTXT += elemList(0).InnerText<br />
strInsertXMLToTXT += elemList(1).InnerText<br />
strInsertXMLToTXT += elemList(2).InnerText<br />
End If<br />
Next<br />
<br />
What am I doing wrong?
|
|
|
|
|
Hi,
Doing some xml/excel related work at present.
When I try to save my .xls file as .xml (i.e. save as .xml data format), an error message tells me that Excel cannot save the workbook because it does not contain any XML mappings.
This does not occur on other machines.
Any thoughts please?
|
|
|
|
|
Excel cannot save your workbook in the XML Data if you have not created one or more mapped ranges (mapped range: A range in an XML list that has been linked to an element in an XML map.).
If you have added an XML map to your workbook, follow these steps to map XML elements to your worksheet:
On the Data menu, point to XML, and then click XML Source to open the XML Source task pane.
To map one or more elements to your worksheet, select the elements in the XML Source task pane. To select nonadjacent elements, click one element, and then hold down CTRL and click each element.
Drag the selected elements to the worksheet location where you want them to appear.
If you haven't yet added an XML map to your workbook, or if your data is not contained within an XML list, you can instead save your workbook in the XML Spreadsheet file format.
Regards,
Bhupesh.
|
|
|
|
|
Hi,
U refresh ur os. Because the os are supported to all the markup languages. And that refresh ur Ms-Office. That is solution for ur problem.
|
|
|
|
|
from web.config:
<appSettings>
<add key="script" value="..."/>
</appSettings>
the value attribute contains some code.
like most code it contains lots of illegal xml chars < > " , ...
can I mark this attribute with a cdata tag to let the xml parser ignore these invalid chars?
thanks in advance,
Niko
|
|
|
|
|
No. Perhaps you can base64 encode the data?
led mike
|
|
|
|
|
i am jus about to teach myself voiceXML i bought a book about voiceXML and i have completed reading this book and what to start trying some developmnt and gtting my hands dirty.
i was able to get eclipse with a plugin for VoiceXML. an i found a sample video tutorial that shows you how to develop a simple application.
but i am wondering what do i need.
1. i have IIS on my machine but do i need a different webserver like probly apache tomcat and if so are there any specific configurations that i am going to have to do
2. in the video tutorial i saw the guy use a pc to pc(sip) application to simulate the calling into the voiceXML application that he said he exported to his apache. the example on his pc tp pc phone should that it was dialing dbDemo@123.234.0.1...... so i am assuming i need an application like that but i am not sure of the name of any application that could do that
|
|
|
|
|
look at loquendocafe ,to upload voicexml files
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
I'm trying to get a .txt file from another domain using xml object; this file includes special characters like ñ, á, é, í, ó, ú and so on.
The code I'm using is:
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")<br />
xml.Open "GET", "http://domain/file.txt", False<br />
xml.Send<br />
If err.number = 0 then filebody = xml.responseText<br />
set xml = nothing
The problem is that all those chars are converted to "?" symbols!
How can I get rid of this thing and get the original characters back?
Thanks a lot 4 your time!
Toby C
(sorry for cross-posting)
|
|
|
|
|
|
Hi.
I have the following element definition in my schema:
<xs:element name="Object">
<!-- must allow all element names and types -->
<xs:complexType mixed="true">
<xs:attribute name="reserved">
<xs:simpleType>
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
when i use an XML that validates with it and tries to define <TEST> element under it, i get an error on validation:
"<TEST> is not allowed under element <Object>"
i want to be able to add ANY element under this one. how can it do that in the schema?
Thanks.
|
|
|
|
|
|
This requires declaring this element in another schema...
but what i need is not declare it at all - just allow any element in the XML to be under the parent element.
|
|
|
|
|
Hi,
I have got some flat files which contain Smalltalk binary serialised objects.
I want the same to be converted in to XML so that I can load them in .Net.
Can anyone suggest an approach / solution for this problem.
Regards,
Tanmay
|
|
|
|
|
Here is snippet of my xml :
<Holidays>
<Months>
<Data>
<Name>August</Name>
</Data>
</Months>
<Days>
<Data>
<Day>1</Day>
<Holiday>Emancipation Day</Holiday>
<Country>(BRB, JAM, TTO)</Country>
</Data>
<Data>
<Day>1</Day>
<Holiday>Parents Day</Holiday>
<Country>(COG)</Country>
</Data>
............................................
Ok here is a Jscript function in my XSL code:
function showCountries(pass)
{
var results ='';
var sendtoDIVid = "requests";
switch(pass)
{
case pass:
results +='<p style="color: Navy">Countrys</p>'+
'<p style="color: Navy">'+pass+' 2006</p>'+
'<ul>'+
']]><xsl:for-each select="Holidays/Days/Data[Holiday = '+pass+']"><![CDATA['+
'<li style="color: navy">'+']]><xsl:value-of select="Country"/><[CDATA[</li>'+
']]></xsl:for-each><![CDATA['+
'</ul>'+
'</table>';
document.getElementById(sendtoDIVid).innerHTML = results;
break;
default:
}
}
]]>
</script>
...............................................
Ok the pass variable comes in and has a holiday for example 'Emancipation Day', that variable is then Checked agaisnt Holiday, then it will print out the country that celebrates 'Emancipation Day'.
Well it doesnt work, I know my logic is right becuase if type in 'Emancipation Day'where [Holiday = 'pass'] is at (so: [Holiday = 'Emancipation Day']) it works.
How do I get that Jscript variable to work?
PS. I already tried writing it so that pass had single quotes " ' " around it.
Please help.
|
|
|
|
|
Hi
Not sure if this a question for XML, SQL or .Net forum but here goes.
I have an XML file with a number of elements, one of which is,
<SQLQuery>select * from trainarrivals where ActiveFlag = 1 and DueTime between ('" + DateTime.Now.ToShortTimeString() + "') and ('" + (DateTime.Now.AddHours(1).ToShortTimeString()) + "')</SQLQuery>
I am using a C# application to read the file and connect to a MySql database. When I get this element the environment adds escape characters to the string so it looks like,
<SQLQuery>select * from trainarrivals where ActiveFlag = 1 and DueTime between ('\" + DateTime.Now.ToShortTimeString() + \"') and ('\" + (DateTime.Now.AddHours(1).ToShortTimeString()) + \"')</SQLQuery>
This in turn causes an exception in my code being thrown.
My question is, how can I write the xml file so the ( " ) is treated as such or change the string when it is read?
Thanks in advance and appologies if this is the wrong place!
|
|
|
|
|
richiemac wrote: DateTime.Now.ToShortTimeString()
What are you going to do with that as a string?
Maybe something like this will work better?
select * from trainarrivals where ActiveFlag = 1 and DueTime between ('?') and ('?')
led mike
|
|
|
|
|
Ok let me explain.
The string is an sql query that is stored in an xml config file. The DateTime stuff is so i can check the database for records within a certain time frame.
I am getting the string from the config file and trying to use concatenation to get the current time - the config will be called at different times and only wants values from the database for the next hour. If I hard code the string in the IDE, e.g.
string sqlStr = "...";
then all works fine. The problem arises when I get the stored string from config.
The reason I'm storing the string in config is because there are many different queries that depend on certain other aspects. The config thing needs to stay in place so I have to get it working this way (if possible).
Hope this clears up the confusion.
Rich
|
|
|
|
|
richiemac wrote: Hope this clears up the confusion.
No it does not. If DateTime.Now.ToShortTimeString() is a TSQL statement then why do you have a "string" in a config file instead of a Stored Procedure?
led mike
|
|
|
|
|
Config files are used because the app has to have the ability to read any appropriate config and use the query string. Users can therefore add new config files that will be read.
At this time the query could be anything so I therefore wouldn't use stored procs. Plus using stored procs now would mean major changes that time doesn't allow for.
The DateTime.Now.ToShortTimeString() is a .net System statement that I'm trying to concatenate into the query string that is read from the config.
If I can't do it in this way is there anyway aroud this without having to make big changes?
|
|
|
|
|
richiemac wrote: that I'm trying to concatenate into the query string that is read from the config.
Ok we are still having some confusion because in your first post ...
richiemac wrote: I have an XML file with a number of elements, one of which is,
and you follow that with the SQL statement including the DateTime.Now.ToShortString() etc.... so.... now it seems that the DateTime.Now.ToShortString() is NOT in the XML data, is that true? If so then my first post offers an example of how you could deal with the problem. If this:
select * from trainarrivals where ActiveFlag = 1 and DueTime between ('@DTStart') and ('@DTEnd')
was in the XML then you could use a System.Data.SqlClient.SqlCommand giving it the string and then setting the parameters using DateTime.Now.XXXX() methods.
see the documentation[^] for details.
does that help?
led mike
|
|
|
|