xml

Can Bing or GMaps API do a "find my nearest" style search using a supplied XML/RSS collection?

Can either Bing or Google Maps allow you to pass in a collection of points and then interrogate that collection to only plot the X nearest points? I am asking because it may be difficult to pre-filter this data and would be much simpler to supply the entire list and filter it within the API itself. ...

How to format solr result documents?

Hi, I want to format the solr result page instead of just a xml- show a user only ten results at a time (one page) and provide links for the next or previous page of results. And add some css . where and how do i do it? Please guide me. Thanks in advance. ...

XML: Enforce child structure for two elements through XML Schema

Is it possible (and if so, how) to enforce with XML Schema that two elements in a document must contain an identical substructure? For instance, I'd like to express that any foo has two children, bar1 and bar2, and bar1 has to have the same child structure as bar2: <foo> <bar1> <baz>hello, world</baz> </bar1> <bar2> <baz>h...

Sql Server XML-type column duplicate entry detection

In Sql Server I am using an XML type column to store a message. I do not want to store duplicate messages. I only will have a few messages per user. I am currently querying the table for these messages, converting the XML to string in my C# code. I then compare the strings with what I am about to insert. Unfortunately, Sql Server prett...

LinkedHashMap with Castor

How can I tell Castor to use a LinkedHashMap instead of a HashMap? ...

How to detect ndash entity embedded in a textarea using Javascript?

I have a textarea within an HTML page into which my users paste content. There is often an "" (&ndash;)(\x2013) embedded in that content. I need to detect and replace it and store it in a database as &ndash;. My code document.getElementById("input").value.replace("-", "&ndash;"); only detects the "-" (minus sign)(\x2D). What would be...

Parsing XML in a java 1.4 environment

I'm developing an application for an old phone which is running java 1.4 and it's not upgradeable. I can't find any library for XML parsign that is compatible with such an old java runtime. Any idea? Thanks! ...

How do I add an attribute to a HashMap using JAXB?

I am writing a RESTful web service client. The service end point requires XML in this format: <top-level-element type=\"array\"> <element-key> <element>foo</element> <other-element>bar</element> </element-key> </top-level-element> I have Java code as follows: public class Parent { @XmlElement(name="top-le...

Copy a subset of xml from one column to another on sql server

I have a table (on sqlserver05) with an xml column. The format of the column is similar to this: <doc> <field name="a">foo</field> <field name="b">bar</field> <field name="c">fizz</field> <field name="d">buzz</field> </doc> I would like to copy a subset of that xml to a new xml column, for instance: <doc> <field name="...

A better way to compare XML docs?

In my current project we have a large repository of content that was originally published in book form. Much of this content was published in both English and many foreign languages, using mostly Quark Express and later InDesign. This content was exported into a custom XML structure for storage and future use. The issue is that the Engli...

Reading php generated XML in flash?

Here is part 1 of our problem (Loading a dynamically generated XML file as PHP in Flash). Now we were able to get Flash to read the XML file, but we can only see the Flash render correctly when tested(test movie) from the actual Flash program. However, when we upload our files online to preview the Flash does not render correctly, missi...

XML: How to reprepresent objects with multiple occurences?

hi, i need to save objects that can occur multiple times. each object is marked with unique identifier. when it is serialized first time all its properties are written. after that only references are used. <actionHistory> <add> <figure id="1" xsi:type="point"> <position x="1" y="2" /> </figure> </add> <change> ...

org.xml.sax.SAXParseException: The entity "ndash" was referenced, but not declared.

I'm parsing the the following... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE tox:message SYSTEM "http://tox.sf.net/tox/dtd/tox.dtd"&gt; <tox:message xmlns:tox="http://tox.sourceforge.net/"&gt; <tox:model owner="scott" package="queue" function="appendFact"> <tox:parameter value=" By John Smith &ndash; Thu Feb 25, 4:54 pm ET&lt;br...

Communication between JSP and Servlet?

I have a jsp page that communicate with a servlet back end. Up until now, the way I communicate with that servlet is via .getJSON() which is a JQuery method. This work great if the data I want to send back is in the form of {key:value}. However, now I need to send a bit more data then that. The largest table in my database, contain rough...

Sorting multiple XML elements within a node, by attribute

I've tried several of the solutions that I've found here, but none seem to work on the model that I'm using. In my example XML, I'm trying to sort the mixed up chapters, into their proper sequence. Source XML: <?xml version="1.0" encoding="utf-8"?> <library> <book> <title>A Fascinating Tale</title> <chapt...

Can I ignore invalid XML character using Scala's builtin xml handlers?

I have an xml file(from federal government's data.gov) which I'm trying to read with scala's xml handlers. val loadnode = scala.xml.XML.loadFile(filename) Apparently, there is an invalid xml character. Is there an option to just ignore invalid characters? or is my only option to clean it up first? org.xml.sax.SAXParseException: An ...

XPath Invalid Expression

<?php $feed = file_get_contents('http://thexmofo.wordpress.com/feed/'); $xml = new SimpleXMLElement($feed); $xml->registerXPathNamespace('media', 'http://thexmofo.wordpress.com/feed/'); $images = $xml->xpath('/rss/channel/item/media:content@url'); var_dump($images); ?> Can anyone tell my why I'm getting Warning: SimpleXMLElem...

Creating subtree from tree which is represented in xml - python

Hi I have an XML (in the form of tree), I require to create sub-tree out of it. For ex: <a> <b> <c>Hello</c> <d> <e>Hi</e> </a> Subtree would be <root> <a> <b> <c>Hello</c> </b> </a> <a> <d> <e>Hi</e> </d> </a> </root> What is the best XML library in python to do it? Any algorithm that already does...

How do I use a custom xml entity in a javascript file

I have an 'overlay.dtd' file with a line like <!ENTITY myentity "myvalue">. At the top of my xul file I have <!DOCTYPE overlay SYSTEM 'chrome://myaddon/locale/overlay.dtd'>. In my xul file, I have <script src='myscript.js'>. I want to know if there is any way to access 'myentity' from the script. alert("&myentity;") just alerts "" ...

Accessing the XML nodes in itemRenderer.

[Bindable]public var headingData1:Object = new Object(); <mx:HTTPService id="srv" url="components.xml" resultFormat="object" result="getHeadings(event);"/> private function getHeadings(evt:ResultEvent):void{ //Alert.show(xmlData.toString()); xmlData = evt.result; headingData1 = xmlData.root.CIT; ...