If I have some xml like so:
<books>
<book title="this is great" hasCover="true" />
<book title="this is not so great" />
</books>
What's the best (or accepted) way in actionscript to check if the hasCover attribute exists before writing some code against it?
...
Can anyone help me to configure struts 2.0.14 (I'm using tomcat 6.0). I want to know what is the procedure to build my first application in struts. Also tell me how xml is used to build a struts application. I have tried and tired of Google and that's why I'm here. Please suggest me some nice tutorial for struts out of your own experienc...
What are the advantages and disadvantages of json vs xml for ajax requests?
Is there a difference in performance? i.e. are browsers able to process one format faster than the other?
...
In XSLT there is the
<xsl:value-of select="expression"/>
to get the value of an element, but is there something to select the tag-name of the element?
In a situation like this:
<person>
<!-- required stuff -->
<name>Robert</name>
<!-- optional stuff, free form for future extension.
Using XMLSchema's xsd:any -->
<prof...
(Follow-Up-Question to How to change LINQ O/R-M table name/source during runtime?)
I need to change the table source of a LINQ 2 SQL O/R-Mapper table during runtime. To achieve this, I need to create an XmlMappingSource. On command line, I could use SqlMetal to create this mapping file, but I would like to create the mapping file during...
I want to have my ASP C# application to be multi-language. I was planned to do this with a XML file. The thing is, i don't have any experience with this. I mean how, do i start? Is it a good idea to store the languages in an xml file? And how in the code do i set the values for ie my menu buttons? I'd like to work with XML because i neve...
I've got an XML document with a default namespace. I'm using a XPathNavigator to select a set of nodes using Xpath as follows:
XmlElement myXML = ...;
XPathNavigator navigator = myXML.CreateNavigator();
XPathNodeIterator result = navigator.Select("/outerelement/innerelement");
I am not getting any results back: I'm assuming this ...
What i want to do is that the user selects some fields on a grid and according to these datas i create an xml file on the web server and then i want user to download it like downloading a any file. But the problem is, i cant use this code:
Response.ContentType = "APPLICATION/OCTET-STREAM";
// initialize the http content-disposi...
We are starting to use nhibernate and have setup a Session Manager to create a new SessionFactory. I need to modify some information the 1st time the app starts.
I open the config file (not app.config) using an XDocument.
<settings>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<reflection-optimizer use="fa...
I have this XML file:
<Response>
<errorCode>error Code</errorCode>
<errorMessage>msg</errorMessage>
<ResponseParameters>
<className>
<attribute1>a</attribute1>
<attribute2>b</attribute2>
</className>
</ResponseParameters>
</Response>
And I want the output to be:
<className>
<attribute1>a</att...
I'm writing a web application using JSP, and I really like to use the "XML style" JSP directive (i.e. <jsp:scriptlet> instead of <% ). But if I use generics in my code, the code content is not valid XML and I get compilation errors when the server (I use Jetty 6) tries to parse the file as XML.
For example, I want to write:
<jsp:script...
I have an wsdl file that describes a group of objects, but I want to extract the definition just from a subset of them, is this possible, and if so what's the best way to achieve this?
My goal is to generate an XSD schema for that subset.
What if you are not using the WSDL generation tools in .NET? Is there a good way to accomplish thi...
My winform app uses xml files to store data, where should I store them so Vista users can write to them?
Thanks
...
I need to create documents, (~150 reports, letters) mostly from pre-existing snippets and local databases, with VBA, in Word 2003. I then need to change specific parts of those snippets, such as dates, phrases, user information, &c. There are also, obviously, some bits that I will generate in my program.
Currently, this same task is don...
I need to walk a JDOM tree and make changes as I go along; at this point, changes are mostly adding new elements right now but could also include reordering elements or removing elements. All work is done on the same thread so there are no concurrency issues.
This turns out to be difficult because JDOM iterators can throw a ConcurrentM...
In programming languages, I'm used to
namespace foo
{
namespace bar
{
void DoIt()
{
}
}
}
int main()
{
foo::bar::DoIt()
}
In a schema(xsd), I'd like to do similar things when defining complexTypes
<xsd:schema targetNamespace="http://www.stackoverflow.com/foo">
<xsd:complexType name="bar1">...
I'm writing one of my first C# programs. Here's what I'm trying to do:
Open an XML document
Navigate to a part of the XML tree and select all child elements of type <myType>
For each <myType> element, change an attribute (so <myType id="oldValue"> would become <myType id="newValue">
Write this modified XML document to a file.
I found...
Hi I have a Java enum and I want serialize a variable containing an enum value back and forth from XML for persistence. My enum is defined like this...
public enum e_Type
{
e_Unknown,
e_Categoric,
e_Numeric
}
My variable is declared like this...
private e_Type type;
I want it to go into an XML tag like this...
<type>value</typ...
Is there any way to take an xml string in .net and make it easyer to read?
what i mean is can i convert this:
<element1><element2>some data</element2></element1>
to this:
<element1>
<element2>
some data
</element2>
</element1>
is there any built in class for this? as sql server 2005 seems to remove all formatting on...
Hi everyone,
I have a string and its value is:
<ROOT>
qwerty
<SampleElement>adsf</SampleElement>
<SampleElement2>The text of the sample element2</SampleElement2>
</ROOT>
How can I write this string to a file using C# 3.0?
Thanks in advance.
...