|
Hi
Can i anyone provide me the links for the conversion of XML to XHTML in .Net.
Thanks in Advance.
|
|
|
|
|
|
Hi,
I have created a XMLWeb Service and there is a class like this
class CUSTOMER
{
public string user;
public string password;
}
I have to used above two attributes in many classes inside the namespace .That 's why I have to declare them as public.
In addition , I need to hide above attributes when clients access my xmlwebservice. becasue those variables are using inside the namespace classes only.
abcservice lobjservice=new abcservice()
lobjservice.customer.user="";
lobjservice.customer.password="";
How do I hide 'user' and 'password' ,when we are accessing the service?
|
|
|
|
|
Hi....
I have a XML file which contains text and encoded waveforms of an ECG....
We had extracted the text, but we don't know to extract the waveform...
Please give a sample code to decode it...
Please reply as soon as possible...
|
|
|
|
|
Hi,
I am developing RDLC (Report) using XSD dataset. I have one doubt is that suppose multiple users display at a time report then can be it possible data show duplicate, because i am using XSD and its store as a XML. Means if users show parallel reports then all users show according to user select criteria and not all users show same reports because i am using XSD. I think you all understand my problem. Any suggestion? One more problem is that when i am insert new field or delete field from table then XSD not updated frequently and also report not show that updated fields. I am currently writing manually in XML file of report for update field related entry. Means updation in database table not update in XSD or Report.
Thanks
Do hard work, you will get result sure !
|
|
|
|
|
I have a code that get a record on table using xsl since my fields are dynamic I dont have the exact name of the field, Intead of the field name I'm thinking if I can use the index of the table to get the record
My sample code
<xsl:for-each select="NewDataSet/Info">
<xsl:value-of select="FIRST_NM"><xsl:value-of select="MIDDLE_NM"><xsl:value-of select="LAST_NM"><xsl:value-of select="ADDRESS"><xsl:value-of select="TEL">How can I change the field name into index field?
Thanks
|
|
|
|
|
I have an HTML file that loads an XML and XSL. If I open the file locally, it works. If I open it remotely, it fails. It works in IE both ways. My folder structure is like this.
FILE.HTML
./includes/css/FILE.css
./includes/js/FILE.js
./includes/xml/FILE.xml --- (XML_file_name) ---
./includes/xsl/FILE.xsl --- (XSL_file_name) ---
Here's the FF part of the code.
// For Firefox.
else if (document.implementation && document.implementation.createDocument)
{
// Load XSL.
var processor = new XSLTProcessor();
var xslt = document.implementation.createDocument("", "", null);
xslt.async = false;
xslt.load(XSL_file_name);
processor.importStylesheet(xslt);
// Load XML.
var src_doc = document.implementation.createDocument("","", null);
src_doc.async = false;
src_doc.load(XML_file_name);
var result = processor.transformToDocument(src_doc);
// Transform.
var xmls = new XMLSerializer();
output = xmls.serializeToString(result);
}
Anyone knows why this won't work? Do all my XML and XSL have to be in the same path?
Thanks!
"I know which side I want to win regardless of how many wrongs they have to commit to achieve it." - Stan Shannon
Web - Blog - RSS - Math - LinkedIn - BM
|
|
|
|
|
Hi
My xml looks like this and I have pasted the code below to parse. The issue is : The first two table nodes have just the LocnId info. So when I fetch LocnId and Zip code, the result of parsing is like this
LocnId Zip
1 30339
2 20000
8 undefined
9 undefinde
Expected output is
LocnId Zip
1 null
2 null
8 30339
9 20000
<NewDataSet>
<Table>
<LocnId>1</LocnId>
</Table>
<Table>
<LocnId>2</LocnId>
</Table>
<Table>
<LocnId>8</LocnId>
<Zip>30339</Zip>
</Table>
<Table>
<LocnId>9</LocnId>
<Zip>20000</Zip>
</Table>
</NewDataSet>
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.load("data.xml");
var x = xmlDoc.getElementsByTagName('Table');
for (var i = 0; i < x.length; i++)
{
LocnId = xmlDoc.getElementsByTagName("LocnId")[i].childNodes[0].nodeValue;
Zip = xmlDoc.getElementsByTagName("Zip")[i].childNodes[0].nodeValue;
}
I am trying to figureout other methods to fetch the node values, but havent figured out yet, any links/help is greatly appreciated.
Thanks
Joe
|
|
|
|
|
You can try XPath[^], which is easy and efficient.
|
|
|
|
|
<root>
<child id="1">
<child id="2">
</root> I have above XML file. I need to find out maximum value of the "id" attribute. I have done by getting all nodes and iterating through each one. I tried XPath also, but it don't have any method to find maximum value. Is there any other method to do this ? This XML file may have thousands of child nodes.
|
|
|
|
|
N a v a n e e t h wrote: I have done by getting all nodes and iterating through each one.
Is there a problem with that?
led mike
|
|
|
|
|
led mike wrote: Is there a problem with that?
Nope. It works well. But is there any other alternative for doing this ? As I will have many nodes, this method may be performance costly.
|
|
|
|
|
|
Try this one XPath-Expression:
child[not(../child/@id > @id)]/@id
|
|
|
|
|
Hi All,
I have XML Schema file(.xsd). I want to make a XML document(.xml) from it. Is there any tool/converter available for that? or I have to make it manually? Please help.
Thank you,
Regards.
|
|
|
|
|
dan neely wrote: Have grammar, need program to write book.
dan replied to the exact same question from another person. Do you understand his reply?
led mike
|
|
|
|
|
Hi led mike!
Thank you for reply. I have found the solution at MSDN. It's working fine for my XSD.
Regards.
|
|
|
|
|
Hi friends,
iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa
Thanx
|
|
|
|
|
Try looking at the Database articles here on CodeProject
Also there is probably an example of doing exactly that as part of the MSDN documentation. You can probably find it searching with Google and putting MSDN as the first key word in your search phrase.
led mike
|
|
|
|
|
You can try this:
DataSet ds = GetMyDataset();
XmlTextWriter xmlFile = new XmlTextWriter (@"C:\TEST.XML", null);
XmlDataDocument xmlDoc = new XmlDataDocument(ds);
xmlDoc.WriteContentTo(xmlFile);
xmlFile.Close();
The code above should take a dataset and write it to a XML file.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
I have one .xsl file. It is used to rendered the data from XML and displaying in HTML format. I want to do editing functionlities(add, edit,modify& delete) in a table.Like there is some default values has been displayed. I need to modify the data. Please help me, it is very urgent for me.
Thanks in advance.
The code is like this:
<xsl:template match="row">
<tr style="background-color:#E8E8E8">
<xsl:for-each select="td">
<xsl:choose>
<xsl:when test="./@first">
<td align="left" width="20px"><input name="radio_field" type="checkbox" style="border-color:white;background-color:#E8E8E8;cursor:pointer" onClick="provideAccess();changeBackcolor(this);">
<xsl:attribute name="id"><xsl:value-of select="attribute::name"/></xsl:attribute>
</input></td>
</xsl:when>
<xsl:when test="@last='true'">
<td align="left" width="10px" ><xsl:value-of select="./text()"/></td>
</xsl:when>
<xsl:when test="@editable" ='true' ">
<td align="left" width="20px"><input name="textbox" type="text" style="border-color:white;background-color:#E8E8E8;cursor:pointer" onClick="provideAccess();changeBackcolor(this);">
<xsl:attribute name="id"><xsl:value-of select="attribute::name"/></xsl:attribute>
</input></td>
</xsl:when>
<xsl:otherwise>
<td align="left">
<xsl:choose>
<xsl:when test="position()=last()">
<xsl:attribute name="width">100%</xsl:attribute>
  <xsl:value-of select="./text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="pos" select="position()"/>
<xsl:attribute name="width"><xsl:value-of select="//th[position()=$pos]/@w"/>px</xsl:attribute>
  <xsl:value-of select="./text()"/>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</tr>
</xsl:template>
<xsl:template match="tf">
<input style="font-weight:bold; cursor:pointer; color: #0b3378" >
<xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
<xsl:attribute name="onClick"><xsl:value-of select="@onclick"/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="text()"/></xsl:attribute>
</input>
</xsl:template>
</xsl:stylesheet>
<!--
REPRODUCE THE BELOW CONTENTS IN INDIVIDUAL FILES UNDER BODY TAG OF A HTML FILE
<body>
<div id='tableSrc'></div>
<script>
//CONSTRUCT INPUT XML FOR TABLE FROM NE VALUES
inputXML="<tableDfn><caption>Table Heading</caption>";
inputXML+="<tHead>";
inputXML+="<th id='1' w='100' sort='true' order='ascending'>Head1</th>";
inputXML+="<th id='2' w='120' editable='true' type ='text'>Head2</th>";
inputXML+="<th id='3' w='120'>Head3</th>";
inputXML+="<th id='4' w='320'>Head4</th>";
inputXML+="<th id='5' w='120'>Head5</th>";
inputXML+="</tHead>";
inputXML+="<tBody>";
inputXML+="<row><td>one1</td><td>two1</td><td>three1</td><td>four1</td><td>five1</td></row>";
inputXML+="<row><td>one2</td><td>two2</td><td>three2</td><td>four2</td><td>five2</td></row>";
inputXML+="<row><td>one3</td><td>two3</td><td>three3</td><td>four3</td><td>five3</td></row>";
inputXML+="<row><td>one4</td><td>two4</td><td>three4</td><td>four4</td><td>five4</td></row>";
inputXML+="<row><td>one5</td><td>two5</td><td>three5</td><td>four5</td><td>five5</td></row>";
inputXML+="</tBody>";
inputXML+="<tFoot><tf type='button' onclick='alert("add")'>add</tf><tf type='button' onclick='alert("close")'>close</tf></tFoot>";
inputXML+="</tableDfn>";
// INITITIALIZAION OF XML DOM OBJECTS
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var xslDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.setProperty('SelectionLanguage', 'XPath');
xmlDoc.loadXML(inputXML);
xslDoc.async = false;
xslDoc.load("../common/xsl/table.xsl");
newhtml = xmlDoc.transformNode(xslDoc);
document.getElementById('tableSrc').innerHTML=newhtml;
// TO SORT TABLE CONTENTS
function sortTable(node)
{
var prevNode = xmlDoc.selectSingleNode(".//tableDfn/tHead/th[@sort='true']");
if (prevNode !=null){
var curNode = xmlDoc.selectSingleNode(".//tableDfn/tHead/th[position()="+node.id+"]");
if (curNode.getAttribute('id')==prevNode.getAttribute('id'))
{
if (prevNode.getAttribute('order')=='ascending')
curNode.setAttribute("order",'descending');
else
curNode.setAttribute("order",'ascending');
}
else{
curNode.setAttribute("order",'ascending');
prevNode.removeAttribute("sort");
prevNode.removeAttribute("order");
}}
else
curNode.setAttribute("order",'ascending');
curNode.setAttribute("sort","true");
var newhtml = xmlDoc.transformNode(xslDoc);
document.getElementById('tableSrc').innerHTML=newhtml;
}
</script>
</body>
--><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\..\vjn\LUCENT CIT Project\Working\1830_Local\web\table" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/><scenario default="yes" name="Scenario2" userelativepaths="yes" externalpreview="no" url="..\inputXML.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->
|
|
|
|
|
Hello Guys
I m newbie at XML and has to work with Veda XML,
Anyone of us has ever worked with this Veda Advantage : Please give some Guidelines to start with it.
I have to do following
-1st. Connection
-2nd. Test Connection[Ping]
-3rd. Transfer Data For Verification
-4th. Received Response and Extract it and store values.
-5th. If there is error in between then solve.
but don't know the Exact And Correct Way to start with It.
Anyone.......... who knows or have ever worked on VEDA.. PLEASE HELP.
SOS...SOS...SOS
Believe Yourself™ :->™
|
|
|
|
|
So I guess this didn't work:[^]
VedaXML Developers Centre We provide you with all the technical information you need to integrate our services into your business systems using the VedaXML information channel. If you need more information on how VedaXML can save you time and money please refer to our VedaXML overview or contact us.
led mike
|
|
|
|
|
Hi Mike
Thanks for reply
<blockquote class="FQ"><div class="FQA">led mike wrote:</div>We provide you with all the technical information you need to integrate our services into your business systems</blockquote>
Are u working for VEDA?????
Actually me and my team is working on this task(Mentioned in previous post),
we are trying to ping, but we are not getting where and what we are doing wrong.
I have a Verification code and access pwd.
Can you please check where we are going wrong?
Here is my code written in C# for PING and the later one is for receive the response.
This is button click on which it goes for PING
<code>
#region XML Click
protected void Button1_Click(object sender, EventArgs e)
{
string username = txt_username.Text;
string pwd = txt_pwd.Text;
string request = "<code>"
+ " <message type="REQUEST"> "
+ "<access> "
+ "<access-code>" + username + "</access-code> "
+ "<access-pwd>" + pwd + "</access-pwd> "
+ "</access> "
+ "<service> "
+ "<service-client-ref>ASUT99991</service-client-ref> "
+ "<service-code>PING</service-code> "
+ "<service-code-version>V00</service-code-version> "
+ "<service-data></service-data> "
+ "</service> "
+ "</message> ";
string response = getReply(request);
Response.Write(response);
}
#endregion
</code>
---------- And this one is for reply ----------
<code>
#region getReply
public string getReply(string strReq)
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(txt_url.Text);
StreamWriter writer = null;
request.Timeout = 1000000000;
request.Method = "POST";
request.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
string postData = "openagent&xml=" + strReq;
//string postData = strReq;
request.ContentLength = postData.Length;
request.ContentType = "text/xml";
try
{
//Create a write to send the data stream to the server
writer = new StreamWriter(request.GetRequestStream());
//Write to server
writer.Write(postData);
}
catch (Exception exc)
{
string str = exc.Message;
}
finally
{
writer.Close();
}
string str1 = "";
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
XmlDocument xmldoc = new XmlDocument();
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
str1 = reader.ReadToEnd();
reader.Close();
}
}
catch (Exception ex)
{
string st = ex.Message;
}
return str1;
}
#endregion
</code>
<div class="ForumMod">modified on Wednesday, February 13, 2008 12:59 AM</div>
|
|
|
|
|
Gandalf - The White wrote: Can you please check where we are going wrong?
I'm confused. Have you tried using the VedaXML Developers Center for help? It wasn't helpful and that's why you are asking here on CodePRoeject?
led mike
|
|
|
|