|
Any one with VXML knowledge? I need help
|
|
|
|
|
hi all, How to create xmpp client using C#? I want to develop an application that will chat with xmpp server like jabber etc? 
|
|
|
|
|
choose a single forum to ask your question, and stick to it.
|
|
|
|
|
Hi,
I have uploaded asp.net c# site with MySql database on the web server but i am having the following error
" Could not load file or assembly 'MySql.Data, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified."
Please tell me what to do.
Thanks
|
|
|
|
|
how should text should be tagged for bold text in docbook v5 for XML export from Indesign?
Is this correct?
<emphasis role="strong">insert text to be bold here</emphasis>
How would you tag bold vs. italic text in an indesign document you are preparing for XML export?
Make an "emphasis" tag for both italic and bold and add an attribute for bold?
I'd appreciate help sooooooooooooooooo much!
-- Modified Thursday, June 17, 2010 7:49 PM
|
|
|
|
|
<?xml version="1.0" encoding="utf-16"?>
<data>
<student>
<roll>234</roll>
<name>Sidheshwar</name>
<address>
<DoorNo>123</DoorNo>
<Street>MyStreet</Street>
<city>
<code>code01</code>
<name>MyCity10</name>
</city>
<city>
<code>code02</code>
<name>MyCity11</name>
</city>
</address>
<address>
<DoorNo>200</DoorNo>
<Street>MyStreet2</Street>
</address>
<address1>
<Sam>1000address1</Sam>
<Pankaj>MyStreet2000address1</Pankaj>
</address1>
<pin>560004</pin>
</student>
</data>
i have a xml i want to convert xml to csv format using XSLT. I need to write XSL for this xml. It Should be genric.
|
|
|
|
|
|
Hi,
I need help writing to an xml file.
this is the XML file
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<photos>
<photo filename="5.jpg" thumbnail="11.jpg" description="jime" />
<photo filename="6.jpg" thumbnail="121.jpg" description="Water Drops (800x600)" />
<photo filename="8.jpg" thumbnail="22.jpg" description="Fireworks (640x480)" />
</photos>
any ideas how to do that?
Thanks,
Farraj
|
|
|
|
|
Hmmm - bit of information lacking, like where are you getting the information you want to write to the XML file, what language are you using, etc.
And also - can you clarify what help you actually want….I mean, you've got an XML file there, you've obviously written it somehow…so what's your problem?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
thank you for your reply
im using C#. ive tried building such a file using linq
XDocument doc = XDocument.Load(Server.MapPath(@"file.xml"));
var temp = (from element in doc.Root.Elements("photo") where element.Attribute("filename").Value == txtBoxFileName.Text && element.Attribute("thumbnail").Value == txtBoxThumbname.Text && element.Attribute("description").Value == txtBoxDesc.Text select element);
XElement result = null;
if (temp.Count() == 0)
{
result = doc.Root.Elements().Last();
result.AddAfterSelf(new XElement("photo", new XAttribute("filename", txtBoxFileName.Text), new XAttribute("thumbnail", txtBoxThumbname.Text), new XAttribute("description", txtBoxDesc.Text)));
result = doc.Root.Elements().Last();
}
else
{
result = temp.First();
}
result.Add(new XElement("photo", new XAttribute("filename", txtBoxFileName.Text), new XAttribute("thumbnail", txtBoxThumbname.Text), new XAttribute("description", txtBoxDesc.Text)));
doc.Save(Server.MapPath(@"file.xml"));
this.lblxml.Text = "done";
this cool code was made for searching a specific node and add the data inside it.
it helps. it adds! but, not the way i need it. i only need to add one node of ((< photo a="1" b="2" c="3" / >))
which i think its pretty simple, im just not good enough at it
appreciating any help.
thanks,
Farraj
|
|
|
|
|
Don't add the XElement twice :
result.AddAfterSelf( ... )
...
...
result.Add( ... );
Cheers
I don't like my signature at all
|
|
|
|
|
i tried that also but it opens the last node and inserts the node i wanted and closes the last node that was opened.
any idea?
i would love if you write me the suitable code.
thanks a lot
|
|
|
|
|
I have problem in accessing the xml file at run time.one program has to write the file and another has to read the xml file simultaneously.
|
|
|
|
|
Hi guys i have this small class task that im having trouble with. I need to create a PHP file using SAX to generate the display shown below from an XML file. Im not sure how to Use | to represent its level, where the root element orders is at level
zero.
*** what the expected output to look like below. ***
[IMG]http://img13.imageshack.us/img13/6950/75914446.jpg[/IMG]
*** This is the xml source code from which i need to generate the display: ***
<orders>
<order>
<count>37</count>
<price>49.99</price>
<book>
<isbn>0130897930</isbn>
<title>Core Web Programming Second Edition</title>
<authors>
<count>2</count>
<author>Marty Hall</author>
<author>Larry Brown</author>
</authors>
</book>
</order>
<order>
<count>1</count>
<price>9.95</price>
<yacht>
<manufacturer>Luxury Yachts, Inc.</manufacturer>
<model>M-1</model>
<standardFeatures oars=\\\"plastic\\\" lifeVests=\\\"none\\\">false</standardFeatures>
</yacht>
</order>
<order>
<count>3</count>
<price>22.22</price>
<book>
<isbn>B000059Z4H</isbn>
<title>Harry Potter and the Order of the Phoenix</title>
<authors>
<count>1</count>
<author>J.K. Rowling</author>
</authors>
</book>
</order>
|
|
|
|
|
Hello there.
My question is kinda hard to explain, I know. But I'll give it a shot. Hope it works
I have a page(product.aspx) with is formed by an xslt and this xslt gets the values from product.xml.
protected void Page_Load(object sender, EventArgs e)
{
string bebek = Request.QueryString["id"];
XmlDocument xdoc = new XmlDocument();
xdoc.Load(Server.MapPath("product.xml"));
XslCompiledTransform xsltran = new XslCompiledTransform();
xsltran.Load(Server.MapPath("pdetail.xsl"));
xsltran.Transform(xdoc, null, Response.Output);
Not, somehow I managed to link the products with a link like detail.aspx?id={product id, lets say 2}.
Now I created a page named detail.aspx, getting the id of the product and trying the same method to construct the sheet.
Here is my code at pdetail.xsl which need some aid
<xsl:for-each select="root/product/pid="'id'">
i tried
<xsl:for-each select="root/product/pid="{id}">
but i wont work.
I will sort the data with the id which I aim to retrieve by the link. Some of you might say, "dont be a noob, just use asp.net facilities to make it." you might be right but I am not that hard coder here.
phew...hope I made it clear
ps: I use C# for .Net.
|
|
|
|
|
ceviz wrote: "dont be a noob, just use asp.net facilities to make it."
Yes, exactly. Use a repeater, datalist, datagrid, whatever and set the datasource to your xml file.
ceviz wrote: am not that hard coder here.
Then learn. The tools are there to help you work smarter so you don't have to do it the hard way.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
try
/pid[@id]
I dont know the xml docment .
|
|
|
|
|
hi,
I need to do language localization using XML in VC++ (MFC).
I need to do mapping using XML file and i need to scan the XML file for the desired language, so that my output would be in my desired language.
I have no idea, how to go about it.
Please Support
|
|
|
|
|
Suppress Xmlns in InnerXML / Rename an XML node in DOM
The Original:
<?xml version="1.0" encoding="utf-8"?>
<EntrySummaryDeclaration xmlns="http://www.gph.ie/schemas/ics/IE315/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gph.ie/schemas/ics/IE315/v1 C:/GPH/Schemas/IE315/v1/schema.xsd">
<Declaration>
:
:
</Declaration>
</EntrySummaryDeclaration>
The Required new output
<?xml version="1.0" encoding="utf-8"?>
<EntrySummaryDeclarationAmendment xmlns="http://www.gph.ie/schemas/ics/IE313/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gph.ie/schemas/ics/IE313/v1 C:/GPH/Schemas/IE313/v1/schema.xsd">
<Declaration>
:
:
</Declaration>
</ EntrySummaryDeclarationAmendment >
The Actual New Output
<?xml version="1.0" encoding="utf-8"?>
<EntrySummaryDeclarationAmendment xmlns="http://www.gph.ie/schemas/ics/IE313/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://www.gph.ie/schemas/ics/IE313/v1 http://wlhost2:38711/xmlreferencesite/customs/ics/IE313-EntrySummaryDeclarationAmendment/v1/schema.xsd C:/GPH/Schemas/IE313/v1/schema.xsd">
<Declaration xmlns="http://www.gph.ie/schemas/ics/IE313/v1">
</Declaration></EntrySummaryDeclarationAmendment>
The approach
I am using DOM, so I cant rename EntrySummaryDeclaration, therefore I create a new EntrySummaryDeclarationAmendment node, and I assign the inner xml of EntrySummaryDeclaration to the inner xml of EntrySummaryDeclarationAmendment before deleting EntrySummaryDeclaration.
The problem:
The innerXml insists on bringing its original xmlns with it.
The requested solution:
How do I suppress the xmlns in the innerxml – removing it as an attribute after the fact has no effect?
Alternatively – how would I rename EntrySummaryDeclaration as EntrySummaryDeclarationAmendment easly?
The offending Code
XmlNode ^TmpNode;
XmlNode ^IE315_Node;
XmlNode ^IE313_Node;
XmlAttribute ^att;
String^ tmpstr;
if (current_message == MessageType::IE315)
{
if (!namespace_found)
try
{
IE315_Node = doc->SelectSingleNode("//EntrySummaryDeclaration");
}
catch (Exception ^e)
{
MessageString = "Error finding EntrySummaryDeclaration: " + e->Message;
MessageBox::Show(MessageString);
}
else
try
{
IE315_Node = doc->SelectSingleNode("//ie:EntrySummaryDeclaration",nsmgr);
}
catch (Exception ^e)
{
MessageString = "Error finding EntrySummaryDeclaration: " + e->Message;
MessageBox::Show(MessageString);
}
// Create node EntrySummaryDeclarationAmendment
IE313_Node = doc->CreateElement("EntrySummaryDeclarationAmendment");
// Set up the attributes
att = doc->CreateAttribute("xmlns");
att->Value = "http://www.GPH.ie/schemas/ics/IE313/v1";
IE313_Node->Attributes->Append(att);
att = doc->CreateAttribute("xmlns:xsi");
att->Value = "http://www.w3.org/2001/XMLSchema-instance";
IE313_Node->Attributes->Append(att);
tmpstr = "http://www.GPH.ie/schemas/ics/IE313/v1"; // the namespace
DocNamespace = tmpstr;
//Add the new namespace to the document
nsmgr = gcnew XmlNamespaceManager (doc->NameTable);
nsmgr->AddNamespace(L"xsi","http://www.w3.org/2001/XMLSchema-instance");
namespace_found = true;
// if there is no local schema specified, include a default.
tmpstr += " http://wlhost2:38711/xmlreferencesite/stuff/IE313-EntrySummaryDeclarationAmendment/v1/schema.xsd";
SchemaBar->Text = "Schema: http://wlhost2:38711/xmlreferencesite/stuff/IE313-EntrySummaryDeclarationAmendment/v1/schema.xsd";
SchemaName = "http://wlhost2:38711/xmlreferencesite/stuff/IE313-EntrySummaryDeclarationAmendment/v1/schema.xsd";
// Debug schema used for development
MessageString = "NOTE: Using DEBUG Schema!!!";
MessageBox::Show(MessageString);
//C:/GPH/Schemas/IE313/v1/schema.xsd
tmpstr += " C:/GPH/Schemas/IE313/v1/schema.xsd";
SchemaBar->Text = "Schema: C:/GPH/Schemas/IE313/v1/schema.xsd";
SchemaName = "C:/GPH/Schemas/IE313/v1/schema.xsd";
doc->Schemas->Add(DocNamespace,SchemaName);
doc->Schemas->ValidationEventHandler+=eventHandler;
nsmgr->AddNamespace(L"ie", DocNamespace);
schema_found = true;
att = doc->CreateAttribute("xsi:schemaLocation");
att->Value = tmpstr;
IE313_Node->Attributes->Append(att);
// Copy contents of EntrySummaryDeclaration to EntrySummaryDeclarationAmendment
IE313_Node->InnerXml = IE315_Node->InnerXml;
// Delete EntrySummaryDeclaration
Delete_Node(IE315_Node);
/* // Remove any attributes from the Declaration node
if (namespace_found)
try
{
//TmpNode = IE313_Node->FirstChild;//doc->SelectSingleNode("//ie:Declaration",nsmgr);
if (IE313_Node->FirstChild->Name == "Declaration")
{
for (int i = 0; i < IE313_Node->FirstChild->Attributes->Count; i++)
{
MessageString = "Element Node: " + IE313_Node->FirstChild->Name + "; attribute[" + i + "]: Name = "
+ IE313_Node->FirstChild->Attributes[i]->Name
+ "; Value = " + IE313_Node->FirstChild->Attributes[i]->Value;
MessageBox::Show(MessageString);
IE313_Node->FirstChild->Attributes[i]->RemoveAll();
}
IE313_Node->FirstChild->Attributes->RemoveAll();
// doc->Attributes->Remove(IE313_Node->FirstChild->Attributes[0]);
XmlAttributeCollection^ attrs;
attrs = IE313_Node->FirstChild->Attributes;
attrs->RemoveAll();
}
}
catch (Exception ^e)
{
MessageString = "Error finding Declaration: " + e->Message;
MessageBox::Show(MessageString);
}*/
// Add the new EntrySummaryDeclarationAmendment node
doc->AppendChild(IE313_Node);
}
Ger
|
|
|
|
|
... I avoided the need to do either by using OuterXML:
XmlNode ^TmpNode;
XmlNode ^IE315_Node;
XmlNode ^IE313_Node;
String^ tmpstr;
switch (current_message)
{
case (MessageType::IE315):
{
if (!namespace_found)
try
{
IE315_Node = doc->SelectSingleNode("//EntrySummaryDeclaration");
}
catch (Exception ^e)
{
MessageString = "Error finding EntrySummaryDeclaration: " + e->Message;
MessageBox::Show(MessageString);
}
else
try
{
IE315_Node = doc->SelectSingleNode("//ie:EntrySummaryDeclaration",nsmgr);
}
catch (Exception ^e)
{
MessageString = "Error finding EntrySummaryDeclaration: " + e->Message;
MessageBox::Show(MessageString);
}
tmpstr = IE315_Node->OuterXml->ToString();
tmpstr = tmpstr->Replace("EntrySummaryDeclaration", "EntrySummaryDeclarationAmendment");
tmpstr = tmpstr->Replace("IE315", "IE313");
doc->RemoveChild(IE315_Node);
doc->LoadXml(tmpstr);
current_message = MessageType::IE313;
Convert->Text = "Con&vert to IE315";
ReferenceNumber->Text = "";
ReferenceNumber->Enabled = true;
break;
}
Ger
|
|
|
|
|
I have little problem. I am getting information from RSS with Xpath from xmldoc loaded from stream. Now i have problem with one node which innerxml looks like this:
<description>A Greek bank Thursday condemned the killings of three of its employees a day earlier as protesters geared up to return to the streets. Protesters object to a government plan that includes wage freezes and higher taxes.<img src="http://feeds.feedburner.com/~r/rss/edition_world/~4/_MQI3aBvO64" height="1" width="1"/></description>
How could i delete text from img src or retrieve it seperately to show image too?
|
|
|
|
|
I suspect that node can be HTML, or HTML-like? In which case, you need to parse that text as HTML so you can manipulate it...
It would help if you supplied more context, i.e. some XML which indicates what nodes of the RSS specification you are referring to exactly...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Hi programmers, i have this task that has been troubling me due to my limited knowledge of XML/XSLT.
My task is to create an XSLT(dictionary.xslt) file that will use an XML(translation.xml) file as input which in turn will generate a desired HTML(dictionary.html) file like the one below.
- The index must be sorted alphabetically. This index serves as a Table Of Contents which allows users to browse through all 'initials' available in this dictionary.
- For each 'initial', the correct number of 'search' terms must be returned.
-
I will be able to do the css styling but as for the xslt code and functions i have little clue, i'd appreciate if someone here with the knowledge will be able to help me with this.
--- input XML (translation.xml) -----
<?xml version="1.0" encoding="UTF-8"?>
<Dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="translation.xsd">
<from>EN</from>
<to>ES</to>
<total>150</total>
<translation initial="A">
<search>A Clockwork Orange</search>
<counter>1</counter>
<replace>La naranja mecánica</replace>
</translation>
<translation initial="A">
<search>A Few Good Men</search>
<counter>1</counter>
<replace>A Few Good Men</replace>
</translation>
<translation initial="A">
<search>A Star Is Born</search>
<counter>1</counter>
<replace>Ha nacido una estrella</replace>
</translation>
<translation initial="A">
<search>Ab Urbe condita</search>
<counter>1</counter>
<replace>Ab Urbe condita libri</replace>
</translation>
<translation initial="A">
<search>Ab urbe condita</search>
<counter>1</counter>
<replace>Ab urbe condita</replace>
</translation>
<translation initial="A">
<search>Abel</search>
<counter>2</counter>
<replace>Abel</replace>
<replace>Caín</replace>
</translation>
<translation initial="B">
<search>Batman & Robin</search>
<counter>1</counter>
<replace>Batman y Robin</replace>
</translation>
<translation initial="B">
<search>Bomarzo</search>
<counter>1</counter>
<replace>Bomarzo</replace>
etc......
..........
</translation>
--- DESIRED HTML OUTPUT ----
[url=http://img401.imageshack.us/i/resultf.jpg/][img]http://img401.imageshack.us/img401/5272/resultf.jpg[/img][/url]
---- WHAT I HAVE ATTEMPTED SO FAR ----
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<html>
<head>
<title>Bilingual Lexicon ES-EN</title>
<link href="dictionary.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>Browse by letter</h3>
</body>
</html>
</xsl:stylesheet>
|
|
|
|
|
 This does most of what you want...I've put in comments to show the different bits...
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<!-- We need a template matching the document root to start the transformation -->
<xsl:template match="/">
<html>
<head>
<title>Bilingual Lexicon ES-EN</title>
<link href="dictionary.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>Browse by letter</h3>
<table>
<!-- Process each translation element, sorted by the initial attribute and then the English term -->
<xsl:apply-templates select="//translation">
<xsl:sort select="@initial"/>
<xsl:sort select="search"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<!-- Template to process a translation element -->
<xsl:template match="translation">
<!--
If this is the first translation element, or its initial attribute is different
to the last one in the list of translation elements, output the
initial attribute.
-->
<xsl:if test="position()=1 or @initial != preceding-sibling::translation[1]/@initial">
<tr><td colspan="2"><h1><xsl:value-of select="@initial"/></h1></td></tr>
</xsl:if>
<!-- Output a row for each translation -->
<tr>
<td><xsl:value-of select="search"/></td>
<td>
<!-- Output the first replace element -->
<xsl:value-of select="replace[1]"/>
<!-- Output the other replace elements preceded by the separator -->
<xsl:for-each select="replace[position()>1]">
;<xsl:value-of select="."/>
</xsl:for-each>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Hi,
I'm new to XML coding and I've got a problem I need help with. I'm developing a model in .gmax for FSX and I'm attempting to trigger animated objects using a switch that determines which animation to run. I know the following example isn't correct, I use this illustrate what I'm trying to do:
<PartInfo>
<Name>xyz_switch</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:xyz_01, bool) 100 *
(L:xyz_02, bool) 100 *
(L:xyz_03, bool) 100 *
(L:xyz_04, bool) 100 *
</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:xyz_01, bool) 0 > if{ (L:xyz_01, bool) 0 } els{ 1 }
(L:xyz_02, bool) 0 > if{ (L:xyz_01, bool) 0 } els{ 1 } <if xyz_01 is has already been activated, then run xyz_02>
(L:xyz_03, bool) 0 > if{ (L:xyz_02, bool) 0 } els{ 1 }<if xyz_01 and xyz_02 have already been activated, then run xyz_03>
(L:xyz_04, bool) 0 > if{ (L:xyz_03, bool) 0 } els{ 1 }<if xyz_01, 02 and 03 have been activated, then run xyz_04>
(L:xyz_05, bool) 0 > if{ (L:xyz_04, bool) 0 } els{ 1 }<if xyz_01,02,03 and 04 have been activated, then run xyz_05>
</CallbackCode>
</MouseRect>
</PartInfo>
Up to now, I've been trudging through and figuring out the code I've needed for new parts I'm creating, but this one's got me stumped!!
Can anyone give me a hand with this?
Thanks!!
AJ
|
|
|
|
|