|
Just like I missed your link
|
|
|
|
|
Hi,
I am using the IXMLDOM objects to create an xml file and write tags to this file.
I would like to create a tag <children count="2">, and under that write the names of the children <childname> value </childname>.
this should look as folowing:
<Root>
<Person>
<Name> value </Name>
<PhoneNumber> value </PhoneNumber>
<Children count = 2>
<childName> value </childName>
<childName> value </childName>
</Children>
</Person>
</Root>
1. Using IXMLDOMDocument or IXMLDOMNode, how do I add a node <Children count =2>, is this an attribute? How do I make sure that it is inserted under the tag?
2. How do I add the sub nodes underneath <childName> value </childName>
If you could give me code examples tha twould be great.
I've tried all kinds of options using the IXMLDOM functiom and it doesn't work!!
Thanks.
|
|
|
|
|
|
Hello,
VS 2008.
I am creating a web service that has to return grammar in xml format. A example is below.
<item>
<tag> id="101"; name="Joe Blogs"; </tag>
<one-of>
<item>joe</item>
<item>blogs</item>
<item>joey</item>
</one-of>
</item>
Where I have the question marks I am not sure of what datatype will be used to return the grammar in.
Many thanks for any suggestions,
Steve
[WebMethod(Description="Auto Generate Grammar for ASR")]
public ???? GenerateGrammar()
{
<item>
<tag> id="101"; name="Joe Blogs"; </tag>
<one-of>
<item>joe</item>
<item>blogs</item>
<item>joey</item>
</one-of>
</item>
return ?????
}
|
|
|
|
|
Hi guys,
I am working on Open Office XML and need to set some of the StylePane options Programmatically. The Style Pane Options in word 2007 its available at Style -> Options. The First dropdown in the pane says "Select Style to Show :". I need to select an option "In Current Document". I need to go to all the contents in the sharepoint site and set this option programmatically. If any one can provide some input on this, that will be of great help. I tried by checking in styles.xml or relations xml, but could not find any.
Thanks in adavnce ,
Venki
|
|
|
|
|
Hai,
In my XML File ,i am having a tag<date> which value is Date & Time.
Like this,
<date>2008/05/19 00:00:00
in my output XML File i want value Like this,
<datetime>05/19/2008 00:00:00
what are the codes need to write in XSL File.
by
Mani..
Born to win...!
|
|
|
|
|
check out the tutorials and references at www.w3schools.com[^]
and don't cross post
led mike
|
|
|
|
|
Hello all's
I am new in ajax and XML.When any form data is saved using ajax ( without page refresh ) Then the function return xml ...
How can i do this can any one help me my code is written below.
<?
some required files.
?>
<html>
<head>
<title></title>
<link href="templates/<?php echo $TEMPLATE ?>/css/stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/<?php echo $TEMPLATE ?>/javascript/jstb_validations.js"></script>
<script type="text/javascript" src="templates/<?php echo $TEMPLATE ?>/javascript/AjaxRequest.js"></script>
<script language="javascript" type="text/javascript">
function ajaxFunction(sText)
{
var ajaxRequest; // The variable that makes Ajax possible!
try
{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer Browsers
try
{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
// Something went wrong
alert("Your browser browser is not compitable for the page on which you are working!");
return false;
}
}
}
var device_type_name = document.getElementById('device_type_name').value;
var reporting_interval = document.getElementById('reporting_interval').value;
var module = document.getElementById('module').value;
var version = document.getElementById('version').value;
var s_key = document.getElementById('s_key').value;
var uid = document.getElementById('uid').value;
var lang = document.getElementById('lang').value;
// This query string is for direct call using class
//var strUrl = '?device_type_name='+device_type_name+'&reporting_interval='+reporting_interval;
// This query string is for API call
var strUrl = '?device_type_name='+device_type_name+'&reporting_interval='+reporting_interval+'&module='+module+'&version='+version+'&s_key='+s_key+'&uid='+uid+'&lang='+lang;
ajaxRequest.open("GET", "api/index.php" + strUrl,onResponse,true);
ajaxRequest.send(null);
// AjaxRequest.get(
// {
// 'url':'strUrl','onSuccess':function(){ alert('Success!');
// }}
// );
// var ajax = new Ajax();
// ajax.makeRequest('GET', 'api/index.php', onResponse);
//blank all field for new entry
document.getElementById('device_type_name').value='';
document.getElementById('reporting_interval').value='';
/////////
function onResponse()
{
if(ajax.checkReadyState() == "success")
{
// add your parsing code here
alert("success");
}
}
}
</script>
<script type="text/javascript">
function ChkFrm_data()
{
frm=document.add_new_dev_type;
if(frm.device_type_name.value=="")
{
CustomAlert('<?php echo NECESSARY_FIELD_REQUIRED?>');
frm.txt_device_type_name.focus();
return false;
}
if(frm.reporting_interval.value=="")
{
CustomAlert('<?php echo NECESSARY_FIELD_REQUIRED?>');
frm.txt_reporting_interval.focus();
return false;
}
}
function CheckInteger(input_object)
{
if(!isNumeric(input_object.value))
{
CustomAlert('<?php echo NUMERIC_FIELD_REQUIRED?>');
input_object.value = "";
//next two lines are there for compatibility with FireFox
myField = input_object;
setTimeout("this.myField.focus();",0);
//input_object.focus();
return false;
}
}
function CustomAlert(message, message_header, message_type)
{
alert(message);
}
</script>
</head>
<body class="body_inner">
<form action="add_new_dev_type.php" name="add_new_dev_type" method="POST" onSubmit="return ChkFrm_data();">
<table id="form_container">
<tr id="form_header">
<td colspan="2"><?php echo HEADING?></td>
</tr>
<tr id="form_message">
<?if(!empty($message)){?>
<td colspan="2"><?php echo $message;?></td>
<?}?>
</tr>
<tr id="field_row">
<td><?php echo DEVICE_TYPE_NAME?></td>
<td><input type='text' name='device_type_name' id='device_type_name' value='<?php echo $device_type_name ?>' /></td>
</tr>
<tr id="field_row">
<td><?php echo REPORTING_INTERVAL?></td>
<td><input type='text' id="reporting_interval" name='reporting_interval' value='<?php echo $reporting_interval ?>' onChange="return CheckInteger(document.getElementById('txt_reporting_interval'))" /></td>
</tr>
<tr>
<td colspan="2">
<input type="hidden" name="module" id="module" value="ADD_DEVICE_TYPE">
<input type="hidden" name="version" id="version" value="0.3">
<input type="hidden" name="s_key" id="s_key" value="<?php echo $CURRENT_HASH?>">
<input type="hidden" name="uid" id="uid" value="<?php echo $USER_ID?>">
<input type="hidden" name="lang" id="lang" value="english">
<input type="button" onClick="ajaxFunction(add_new_dev_type)" name='Save' value='Save' />
</td>
</tr>
</table>
</form>
</body>
</html>
Regard's
Kaushik
|
|
|
|
|
Hi frnds...
I hv excel template with it look and feel...
Dat excel i hv converted into .xml file by saving excel sheet to xml.
Used
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
and closing tag
Nw i want to add data frm database into xml for which i hv used
<xsl:for-each select="dataset/table"> and also use <xsl:if test="group_id=1">
then fill the first row of xml and for other group_ids...
the xml file get generated bt when i open the xml file into excel file it gives me error
XML ERROR in Worksheet Setting
REASON: Bad Value
FILE: C:\Documents and Settings\Administrator\Desktop\ReportsinExcelWithXML\AuthorReportGenerator\bin\DebugReport.xml
GROUP: Worksheet
TAG: Table
ATTRIB: ExpandedRowCount
VALUE: 58
and the <Table> tag of xml has
<Table ss:ExpandedColumnCount="9" ss:ExpandedRowCount="58" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s25" ss:DefaultRowHeight="12">
plz help me... its urgent
|
|
|
|
|
Hi Guys,
i am working on a project using vs2005,vb.net.
i have data on a datagrid as follows...
StockCode|Description|Qty,UOM
1234 |TEST |20 |KG
5678 |TEST2 |15 |KG
The Xml format required must be as follows...
<item>
<key>
<stockcode> 1234 </stockcode>
</key>
<description>TEST</description>
<qty>20</qty>
<uom>KG</uom>
</item>
i am currently reading the xml template and creating the xmldoc but it is taking way too long.
What is the fastest way to create this xml, bear in mind that my datagrid may have up to 30000 rows and 80 columns.
thanks
Anoop Brijmohun
|
|
|
|
|
Hello Everybody
I have to convert xml file into wbxml file. For this I am using libwbxml2 library but when I tried the sample code given by it is not working its giving the statement that
WBXML_ERROR_XML_LANGUAGE_UNKNOWN.
when I tried to convert wbxml to xml its giving error as WBXML_ERROR_ATTR_VALUE_TABLE_UNDEFINED
Plz help me
Thanks in advance
|
|
|
|
|
Hi,
I have a XML document (that I've got from an InfoPath form) and it has its namespaces.I'd like to deserialize this XML document into a type and send it to a WebService.The type has been generated when I referenced the WebService in my project.
When I try to deserialize the XML document I get a "xmlns was not expected" error thrown by XmlSerializer.
What should I do to either remove namespaces from the XML document or introduce them to XmlSerailizer so It can recognize QNames?
Regards
|
|
|
|
|
I have two XMls having same node and different data(innertext)
I want to compare these two xmls and if there is any change then save the new one into the database
and if both are same then do not save the data
How can I compare these XML data?
say I have two XMLs
string xml1= originalDataXML;
string xml2= editedDataXML;
How can I compare these two in C# and ASP.NET 2.0?
|
|
|
|
|
You don't know how to compare two strings? How about String.Compare[^]
led mike
|
|
|
|
|
|
|
Don't delete your posts. This site is not here just for you. Others may benefit from your question and any replies given that solve the problem.
led mike
|
|
|
|
|
Hi all,
I have an xml with a lot of data. Currently all the data are transformed into one html page using xsl. It is displayed using an HTML control in VC++. This control has a particular height and so a vertical scrollbar will be displayed if the page is larger.
My requirment is that I need to split this page to multiple pages to avoid this scrollbar. And there should be "previous" and "next" buttons for showing each pages.
Could anybody direct me to the solution? I am newbie in xsl and html.
Thanks in advance
|
|
|
|
|
NS17 wrote: Could anybody direct me to the solution? I am newbie in xsl and html.
Well without having intimate knowledge of your XML that would be rather difficult. Understanding the XML, the nature of the Data in the XML and the HTML Page requirements are all required to even start thinking about how to proceed. Potentially you will also need to go fairly deep in reusing the browser control to deal with the interaction for next/back type behavior unless you are just going to create temporary files on a local drive.
led mike
|
|
|
|
|
Thank you for the replay...
led mike wrote: without having intimate knowledge of your XML
Actually the XML has values that can be shown as tables, most probably some numbers. The output is generally having tables with a number of rows. If the displayed data height exceeds the visible area, I need to break the table (which hits the bottom) and let the remaining parts be shown in the next page. If so, the data will be shown in more than one page.
led mike wrote: will also need to go fairly deep in reusing the browser control to deal with the interaction for next/back type behavior
I cannot do in such a way because I am updating a currently running project. Also no file is generated physically, but it is handled by the VC++ controls.
Thank you.
|
|
|
|
|
NS17 wrote: I cannot do in such a way because I am updating a currently running project.
I have no idea what that means
led mike
|
|
|
|
|
Actually my project contains many xsl and xml handling as I noted before. That is why I cant change the VC++ control for HTML behaviour right now. Instead of that I should manage the xsl and html template to get the expected results.
Also I dont have any experience in this area of xsl and html... I am doing a self study, that might be why I cant explain things better. Sorry.
Thank you for your reply.
|
|
|
|
|
Hi,
I have a problem with validation a list of different subclasses. The are all derived from one base class(ElementBase).
I want to make the schema future-proof by adding a placeholder.
Here a short example
< xs:element name="Elements">
< xs:complextype>
< xs:choice minoccurs="0" maxoccurs="unbounded">
< xs:element name="BaseElement" type="ElementBase" />
< xs:element name="Sphere" type="ElementSphere" />
< xs:element name="Cone" type="ElementCone" />
< xs:element name="Cylinder" type="ElementCylinder" />
HERE I need a placeholder
< /xs:choice>
< /xs:complextype>
< /xs:element>
My idea was to make another complex type with an any Parameter like followed.
< xs:complextype name="FurtherElements">
< xs:complexcontent>
< xs:extension base="ElementBase">
< xs:sequence>
< xs:any minoccurs="0" maxoccurs="unbounded" />
< /xs:sequence>
< /xs:extension>
< /xs:complexcontent>
< /xs:complextype>
But how do I put this into the choise statement? I still don't know the name of the future elements (but xs:element needs one: < xs:element name="" type ="FurtherElements"/>). Is there any workaround to solve this problem?
Thanks a lot
modified on Monday, June 9, 2008 4:53 AM
|
|
|
|
|
HI
anybody has a sample program (with VB or JAVA) to read from an XML file to a simple form (include a text field and a check-box or radio-button) and load dat of these controls and then save changes again on XML file by pressing a "save" button.
I need for old ASP (not ASP.NET)
thank you
|
|
|
|
|
I need to programmatically create XML storage files, and I've seen what people do in articles.
It seems that most people just use the XmlWriter class, manually writing low-level elements one at a time. However, I was wondering if there's a more elegant way to accomplish this task; for instance, a single function that says:
"Make a 'hello' node as the child of 'root'->'greetings'->'hi'"
where the 'hello' node is fully defined in a class before being inserted.
|
|
|
|