|
I am currently parsing NULL to both those arguments. But because I am extracting the node with the Id attribute set to "MsgOperation", I am obviously missing namespace declarations etc that are in the parent node, as a result my computed DigestValue is incorrect.
All I require at the moment is for someone to let me know what the EXEC_C14N result of the said node which is then fed into the SHA-1 algorithm and Base64'ed the result of which (i.e. DigestValue) is:
wJsL4RtLToFeHW/xt2ewbAAiNxk=
That way at least I could get some idea of what the node is transformed into as a result of the EXEC_C14N process!
|
|
|
|
|
Andy H wrote: All I require at the moment is for someone to let me know what the EXEC_C14N result of the said node
Sorry, I don't have an environment established where I can do that. Since you have the XML yourself why can't you just give the namespace argument to the function?
led mike
|
|
|
|
|
I tried that, didn't work. I will be working on it further tomorrow. If I get it to work I will post what I did to resolve the issue.
|
|
|
|
|
Just to let anyone know, if they are interested, that I have manually worked out the result of the EXEC-C14N for the //ns1:Operation node of the XML posted in my orriginal message above, to be:
[code]
<ns1:Operation xmlns:ns1="http://www.ros.ie/schemas/service/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="MsgOperation" soapenv:mustUnderstand="0" xsi:type="xsd:string">CT1/File</ns1:Operation>
[/code]
This helped
|
|
|
|
|
Andy, I'm glad you solved your problem.
The only difference in your solution XML from your original post is the addition of
<br />
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
If that was the question you were asking I never even got close to understanding your question.
led mike
|
|
|
|
|
When you Canonicalize an XML sub-document you need to ensure that the namespace declarations used within that node but which were originally declared in an ancester node you need to re-declare in the node in which the namespace is being used in the sub-document. Then having done that you need to ensure that the namespace declarations are in order as per their prefix, AND any attributes but not in alphabetical order of the attribute or its prefix (if used) but per the order of the URI of that prefix... Get it!!!
Having solved that I have a much larger XML node structure extracted from the orginal XML document to sort out along the same lines. All good fun.
If you read the page to which I gave a link it makles it clearer, much clearer than many books I have read on Canonicalization.
|
|
|
|
|
Andy H wrote: If you read the page to which I gave a link
Thanks Andy, I can't find in this thread where you provided any link though?
led mike
|
|
|
|
|
The link was in my message (at the bottom) where I explained I had worked out the EXEC_C14N output.
Here it is
|
|
|
|
|
Andy H wrote: The link was in my message (at the bottom)
Wow, I really did look for it, I guess I picked a bad day to stop smoking crack.
led mike
|
|
|
|
|
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
|
|
|
|
|
|