|
Hi am a LAMP developer and our team are about to embark on a version 2 of a web based application, with an upgrade of client tier to AJAX. For client-server communication we have narrowed down the options to XML and JSON was wondering what are the benefits and drawbacks of both. Right now am leaning towards JSON?
Regards
|
|
|
|
|
As opposed to embedding an image within a Microsoft Word 2007 document, I have been looking for the possibility of using XML to link to another location on the network where the image files would be stored locally.
Is this possible? If so, would anyone be able to help by pointing me in the direction of learning more knowledge on this subject?
Any and all help is greatly appreciated
jsquires
modified on Friday, October 16, 2009 10:57 AM
|
|
|
|
|
HI,
I HAVE A XML FILE WITH HYPHEN(-) IN SOME ITS ELEMENTS FOR EXAMPLE
<NAME>
<FIRST-NAME>JOHN </FIRST-NAME>
<LAST-NAME>MILLER </LAST-NAME>
<AGE>25 <AGE>
</NAME>
I ALSO HAVE XSD FILE VALIDATING THIS XML FILE AND WHEN I BULKINSERT IT IN MY DATABASE ELEMENT NAMES WITH
HYPHEN ARE NOT INSERTING <FIRST-NAME>JOHN </FIRST-NAME> , <LAST-NAME>MILLER </LAST-NAME>
WHERE AS NON-HYPHEN ELEMENTS <AGE>25 <AGE> INSERTED FINE.
HOW CAN I VALIDTE THE HYPHENATED ELEMENTS WITH MY XSD AND THEN INSERT INTO DATABASE. PLS HELP
sai krishna
|
|
|
|
|
The validation is obviously not a problem - it's that your database doesn't allow/have fields with hyphens? How are you inserting into the database?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
HI STUART DOOTSON , THANKS FOR REPLYING
MY DATABASE IS SQLSERVER AND I AM BULK INSERTING MY XML FILE USING SQLXML3.0 FRAMEWORK . IHAVE A VB SCRIPT LIKE
OBJECT.Execute "MYSCHEMA.XSD" , "MYXMLFILE.xml"
AM ASLO MAPPING MY XML TAGS WITH SQLSERVER TABLE NAME IN MY XSD FILE
<xsd:element name="FIRST-NAME" sql:relation="FIRSTNAME" >
<xsd:complexType>
....................
..........................
</xsd:complexType>
</xsd:element>
sai krishna
|
|
|
|
|
hi,
i don't know if i'm posting at the right forum ....so plz be merciful
i'm not familiar with the SOAP protocol or with the web services....i searched ggogle did'nt foundsomething useful on how to work with web services and implement it in my desktop application or my web application ...so any links would be appreciated
|
|
|
|
|
roba alchab wrote: i'm not familiar with the SOAP protocol or with the web services....i searched ggogle did'nt foundsomething useful on
Are you sure you searched? What about all of these[^]?
|
|
|
|
|
Hi,
I am new to xml,i have create a 3 textbox using xml,and i want to pass the user inputvalue to php variable and insert into db...
how to do this...
<samplefield1fromgroup4 translate="label">
<label>User Name</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</samplefield1fromgroup4>
need help....
|
|
|
|
|
Hi,
please let me know wat are teh requirements required to develop a gaming project in XML....i mean along with XML what other technologies can be used.
|
|
|
|
|
|
XML is of no intrinsic value to writing games. It may be used as a way to store data, but there will NEVER be a book or article called 'using XML to write games'. XML is not even a language.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am trying to use the tokenize function and I have tried many different namespaces but was unsuccessful. With the Xalan namespace, a call to function-available('xalan:tokenize') returns false.
With EXSLT, I get the error: Variable 'ctxN' has not been declared.
What does that mean? This is what I have for my stylesheet element:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<br />
xmlns:msxsl="urn:schemas-microsoft-com:xslt"<br />
xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"><br />
<xsl:include href="str.tokenize.msxsl.xsl"/>
And then, when I switch to str.tokenize.template.xsl, I get the error:
Cannot find the script or external object that implements prefix 'http://exslt.org/strings'
What am I doing wrong? I am using Microsoft Visual Studio 2008 .NET. Any ideas?
Thanks!
|
|
|
|
|
Hi all...i'm new to xml...i'm displaying values from xml file to html using the below code...
HTML FILE
<form id="form1" runat="server">
<div>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="Product" ValueField="ID" TextField="Name"></asp:TreeNodeBinding>
<asp:TreeNodeBinding DataMember="Desc" ValueField="Value" TextField="Value"></asp:TreeNodeBinding>
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XML/XmlFile_1.xml">
</asp:XmlDataSource>
</div>
</form>
XML FILE:
<?xml version="1.0" encoding="utf-8" ?>
<!-- This file represents a fragment of Product
store inventory database -->
<Products>
<Product ID="1" Name="a" Price="5">
<Desc Value="5 boxes x 50 Bags"/>
</Product>
<Product ID="2" Name="b" Price="10">
<Desc Value="24oz bottles"/>
</Product>
<Product ID="3" Name="c" Price="15">
<Desc Value="40 kg pkgs"/>
</Product>
</Products>
Now i wanna use a text box in HTML and i need to store them in XML....how can i do that....
modified on Friday, October 9, 2009 11:39 PM
|
|
|
|
|
Did you look at any of this before or after you posted it?
|
|
|
|
|
i searched, but i didt get anything...
|
|
|
|
|
hey all.
I have this code
<albume1>
<file>Mortal.mp3</file>
<file>Seek.mp3</file>
</albume1>
and need function which is written in C#.NET
to do these things
gets name of file as parameter/
void RemoveLine(string name)
{
searchs in albume1 the name lets take for example "Seek.mp3"
found one delete the whole line
<file>Seek.mp3</file>
}
so the final result/save of XML file would be :
<albume1>
<file>Mortal.mp3</file>
</albume1>
I tried with InnerText attribute but InnerText takes whole Textes which appear among the two tags
thanks
modified on Tuesday, October 6, 2009 3:54 PM
|
|
|
|
|
First of all, i would say that you have to remove a node not it's innertext. So you need to find the node.
Second thing, IS all the album node is named as albume1 or is it the name of the Alubum?
anyways you can remove the child node in this way.
XmlDocument _xmlDoc = new XmlDocument();
if (System.IO.File.Exists(xmlDbFilepath))
{
_xmlDoc.Load(xmlDbFilepath);
}
XmlNode albumNode = _xmlDoc.SelectSingleNode("/root/album");
if (albumNode != null)
{
foreach (XmlNode node in albumNode.ChildNodes)
{
if (node.InnerText.trim() == fileName)
{
albumNode.RemoveChild(node);
}
}
}
I hope it will help you.
|
|
|
|
|
thanks for helping i will try the code.
with regards to ur Q.
albume1 is name of the album so there will be also albume2 and albume3
and all those tags are subs.. of main tag which is <albumes>
this how my xml file looks like:
<?xml version="1.0" encoding="utf-8"?>
<albumes>
<albume2>
<file>soso</file>
<file>D:\test.mp3</file>
<file>D:\test.mp3</file>
</albume2>
<koko>
<file>soso</file>
<file>D:\test.mp3</file>
<file>D:\test.mp3</file>
<file>D:\test.mp3</file>
</koko>
<Roro>
<file>D:\test.mp3</file>
<file>D:\test.mp3</file>
</Roro>
</albumes>
with regards to this line :
XmlNode albumNode = _xmlDoc.SelectSingleNode("/root/album");
why have u used root's word?
i have no roots word in there
u meant it as Theory? or what i cannot get it
can you replace the line please after that i gave u clear idea about the xml.
|
|
|
|
|
|
Actually you havn't provided the whole xml so i have taken "root" as placeholder. For your case it would be "albumes". Also in "/root/album" is the placeholder for the album name.
|
|
|
|
|
Thanks a lot.
I believe in ur codes
but in my project actually did not work.
even so its a good code.
am not aware of the reason
by the way i changed the whole idea.
besides removing nodes and staff
i used re-write method.
to be more clear.
I used an array(List) to help
lets say i have album named "Koko" and down to it has 2 songs
blah1
blah2
and wanna delete song named "blah2"
i insert two songs first to an array
when click remove song,, it goes to this array and delete existing song.
and call a function that writes info from this array to xml file.
so xml file will be updated with a new info from that array.
thanks anyway ))
|
|
|
|
|
<BookStore>
<Book>
<Page pname="abcded"/>
<Page pname="def"/>
<Page pname="ghi"/>
<page pname="acd"/>
<page pname="cad"/>
<page pname="amd"/>
</Book>
</BookStore>
How can I select all page elements (xpath query) having pname starting with "a"
Thanks.
|
|
|
|
|
Try //Page[starts-with(@pname, 'a')] (presuming it is Page , not page )
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I've been looking all over the Internet and my books for an answer to this, but I cannot find it anywhere, I used to be working with SQL and I am new to XML coding.
I’m building a corporate website that is receiving it’s data through an xml adapter. The data is unsorted. I need to sort it in two ways
1. Sorted by date in the gridview
Before it’s sent to the client the xml should be sorted by date, with no further sorting functions in the gridview.
2. Sortable by the user in the gridview
This should be sortable by the user clicking the column in the gridview. Setting allowsorting=”true” expects some coding in the sorting sub. I tried so much that didn’t work
Protected Sub GrvSearchOffers_Sorting(ByVal sender As Object, ByVal e As GridViewSortEventArgs)
End Sub
In both cases I retrieve the xmldata in the code behind file using a dataset. This dataset is bound to the gridview displaying the unsorted data.
Thanks in advance for any help, I'm getting a bit desperate.
Bram
|
|
|
|
|
I think an XSLT stylesheet is your best option for sorting the actual XML. Beyond that, you could read your XML data into the entity classes that I assume exist, sort those, and then view from there.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|