I am working with an XML list at the moment, which looks like this:
<feature type="startLocation" value="1" x="15" y="3"/>
<feature type="startLocation" value="1" x="15" y="4"/>
<feature type="startLocation" value="1" x="15" y="5"/>
<feature type="startLocation" value="1" x="15" y="6"/>
<feature type="startLocation" value="1" x="15" y="...
(This post is soliciting personal experiences about storing XML; please share what you know. :-) )
I am working on a service application that communicates with an external service using XML. I am planning to use SQL Server 2008 to store the XML that is received and sent to the external service. I'm exploring my options for storing ...
If I have:
<quotes>
<quote>
<name>john</name>
<content>something or other</content>
</quote>
<quote>
<name>mary</name>
<content>random stuff</content>
</quote>
</quotes>
How do I get a list of the element names 'name' and 'content' using T-SQL?
The best I've got so far is:
declare @xml xml
set @xml = ...
sele...
I am developing applications that communicate to a web service to access a database.
One of the web service calls returns data held by a node in a tree structure by taking either the GUID of the node, or NULL to return the root node.
Adding a web service reference to a managed project easily allows null to be sent as a parameter, but ...
Is there a way to map (using xstream) a List<Person> to <friends> and List<Things> to <stuff> for example?
Thanks!
...
I am trying to dynamically populate the static constraint ={} at run time. Is there a way to do this. Example code:
Normal statement:
static constraint = {
lastName(blank:false, maxSize: 100)
}
What I am trying to do:
static constraint = {
call to an XMLSlurper that returns a HashMap of lastName as a key and (blank: false, maxSize:...
I want to append an attribute an existing element in XML using Java. For example:
<employee>
<details name="Jai" age="25"/>
<details name="kishore" age="30"/>
</employee>
It want to add weight to it (assume that it is calculated and then appended in response). How can I append that to all items?
<details name="Jai" age="25" weight="5...
Hi everyone,
I seem to be having an issue with Xalan's translate method.
I have the following code:
translate(translate(string(name),'<sup>',''),'</sup>','')
This is used to remove <sup> and </sup> from string(name). Unfortunately when I do that, it seems to remove s, u and p from the names as well.
So names like sony Bra...
I'm using DOMi ( http://domi.sourceforge.net ) to create XML from arrays.
But I don't know how to create attributes in these XML (in arrays, so these attributes appear in the XML). How can I construct these arrays so I can get some tags with attributes after the convertion?
Thank you!
...
I'm trying to use the weatherbug API, but seem to be stuck quite early in the proceedings.
The [very simple] code I tried:
function weather_widget($apikey, $zipcode) {
$url = "http://$apikey.api.wxbug.net/getLiveWeatherRSS.aspx?ACode=$apikey&zipcode=$zipcode&unittype=0&outputtype=1";
$contents = file_get_contents($url);...
I have a custom Java Tree class (from stanford parser,) that I am able to work with in JRuby on Rails.
What I am trying to figure out how to do is to output this tree class to XML through rails
The tree class describes a word tree derived from a parsed sentence. Each tree may have multiple child trees depending on the structure
Here i...
i am trying to parse an xml blog found here: http://www.feed43.com/1515171705611023.xml
it has pictures within the text. I am able to parse the headers, the content and the link of the individual posts.
I, however, cannot get it to parse the paragraph spacing links within the text or images. all three of these are EXTREMELY important....
I have been trying to build a child/parent navigation for a little while now using PHP (I'm from a .net background) and I can't get close to the desired results. I am loading my data from an xml file using simplexml successfully but I am trying to workout how I can map that into arrays or variables so I can write it out.
<Categories>
...
I have the following data sent by an external system which needs to be parsed for a particular Key
<ContextDetails>
<Context><Key>ID</Key><Value>100</Value></Context>
<Context><Key>Name</Key><Value>MyName</Value></Context>
</ContextDetails>
I tried parsing this with the regex to fetch the value for the KEY : Name
<Context><Key>Name<...
Lets say we have a table "Names":
ID Name Surname
1 Matt Smith
2 John Doe
How would you write some SQLXML to generate this:
<people>
<person>
<name>Matt</name>
<surname>Smith</surname>
<person>
<person>
<name>John</name>
<surname>Doe</surname>
<person>
</people>
The best I've got is this:...
Given the following (piece of) a soap call;
<m1:NextCommencementDateInput xmlns:m1="http://foo.bar.com/Types">
<aDate xmlns="">2010-06-02</aDate>
</m1:NextCommencementDateInput>
Apperantly this is the same as (when validating against the xsd using XMLSpy)
<m1:NextCommencementDateInput xmlns:m1="http://foo.bar.com/Types">
...
Does anyone knows how can I configure inst2xsd to generate int and not byte (nor short)?
I use the -simple-content-types smart (default) option.
see also their online docs.
10x, asaf :-)
...
When writing in java the following:
Element fieldEl = targetDocument.createElement("field");
fieldEl.setAttribute("Wine","Marlo");
fieldEl.setAttribute("Beer","Corona");
The order of adding the attributes are not kept in the result XML file.
How can I control the order of the attribute inside XML Element (so it will be easy for human...
Hi,
I have some generated proxy classes, that contain properties with the XMLAttribute attribute, e.g.
[System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.egem.nl/StUF/StUF0301")]
public Verwerkingssoort verwerkingssoort
{
get
{
return this.verwerkingssoo...
I am hoping to to build a model for a single table that houses different types of "articles" (for argument's sake).
Each article will have MOSTLY common fields (e.g. title, date etc.) but there are cases where some article types (outside of my control) have slightly different field requirements and respective validation rules . No fie...