xml

Convert tabular data to XML using SQL Server

I have a flattened table that contains columns that represent groups that need to be displayed in XML. Example data: Market, Label, Style, Type XXX, YYY, JJJ, 111 XXX, YYY, JJJ, 222 XXX, YYY, JJJ, 333 XXX, YYY, JJJ, 444 XXX, YYY, LLL, 111 XXX, YYY, LLL, 222 XXX, YYY, LLL, 333 ...

C# , xml parsing. get data between tags

I have a string : responsestring = "<?xml version="1.0" encoding="utf-8"?> <upload><image><name></name><hash>SOmetext</hash>" How can i get the value between <hash> and </hash> ? My attempts : responseString.Substring(responseString.LastIndexOf("<hash>") + 6, 8); // this sort of works , but won't work in every situation. also ...

Content inside CDATA is not displayed properly when processed through JavaScript

I have an XML document with some sample content like this: <someTag> <![CDATA[Hello World]]> </someTag> I'm parsing the above XML in JavaScript. When I try access and render the Hello World text using xmldoc.getElementsByTagName("someTag")[0].childNodes[0].textContent all I get was a blank text on screen. The code is not returning ...

How to detect and remove unnecessary xmlns:<something> attributes in PHP DOM?

Say I have a source document like this: <element> <subelement xmlns:someprefix="mynamespace"/> </element> The xmlns:someprefix is obviously not needed here and doesn't do anything since that namespace is not being used anywhere in the document. In PHP, after I've loaded this into a DOM tree with DOMDocument->loadXML(), I'd like to ...

RegExp replace a specific XML/HTML TAG in PHP

Hi all, I have a little script that replace some text, that come from a xml file, this is an example: <b>Hello world,</b> <include file="dynamiccontent.php" /> <img src="world.png" /> a lot of <i>stuff</i> Obviosly the string is much more longer, but I would like to replace the <include file="*" /> with the content of the script in t...

Storing Data as XML BLOB

Hi, At the moment the team i am working with is looking into the possibility of storing data which is entered by users from a series of input wizard screens as an XML blob in the database. the main reason for this being that i would like to write the input wizard as a component which can be brought into a number of systems without havin...

Any native XML DOM on Windows with control over memory allocation?

I'm looking to replace MSXML with a library that will allow us to use DOM processing but using our own allocation, so we can assure it is mapped directly onto a memory-mapped file. This avoids having to synch the DOM back to the file. Can anyone please suggest which of the various libraries out there is most likely to be easily customise...

How to cache Cake generated XML files?

Hi, This is specifically about CakePHP's caching system. It seems to work fine caching view files, but not for xml files. This is the file I want to cache: /views/thing/xml/config.ctp It is being called like this: http://website.com/thing/config.xml This is the class I have: class ThingController extends AppController{ pub...

Parsing external XML to JSON in Java?

So I'm sitting here with Google Geocoder, which returns an XML via 'GOOGLE_URL/xml?address=input&sensor=false'. I need to fetch it by using Java and parse it into a JSON object and send it onwards. How would I go about to do this? (No this is not homework) Note that it should preferably be done within the standard libraries. At the mome...

Best way of using web services on iOS?

I'd like to build an iOS app which lets you log in to a web service. After that, the app would (when the user chooses) send the login name/pass, together with the requested variable(s), over https. For instance after requesting 'news-update', it would receive the requested info in XML format... something like: <news-update> <title>K...

Aesthetic question about Xstream XML output

Hi all, When I output an XML file using Xstream with a custom converter, all the nodes are printed out nice and indented etc., however when I print out another object, there is no new line between the end object tag and the new object tag. Take the example below: </macroblock> </frame> </MetadataFrame><MetadataFrame frame="456"> ...

How to display data from XML file to ListView using LINQ to XML?

I'm having an xml file like <Root> <Child val1="1" val2="2"/> <Child val1="1" val2="3"/> <Child val1="2" val2="4"/> </Root> i need to display the data from the Xml file to a Listview like (Added A to index value) Now i'm using like 1.Stores the data in an XmlNodesList 2.Then iterate through the nodeslist and add the attribut...

How to parse XML from within a mobile?

I've looked into XOM but it seems that it doesn't work on mobile phones (blackberry). How can I parse XML to get information out of it using Java on the Blackberry? ...

Strange Silverlight Problem

I have a method that generates XML for a class I have created -getXML(). This is called from the following methods: private void send_Response() { String xmlUrl = ((App)Application.Current).Resources["xmlUrl"].ToString(); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(xmlUrl, UriKind....

PHP Getting parent's ID => child's value as array from XML

I have an XML file structured like this <serieslist> <series sid="123"> <title type="main">Series 123 Main Title</title> <title type="official">Series 123 Official Title</title> <title type="short">S 123</title> </series> <series sid="456"> <title type="main">Series 456 Main Title</title> ...

Open a popup during mouseover of listbox textblock

Photosuru has a neat effect - when you mouseover the thumbnail image a popup opens showing the image enlarged. I am trying to get this to work on a listbox, similar to a tooltip, I need to mouseover an item and have the popup open. The problem, the popup only shows the item selected in the listbox. I tried looking through Photosuru code ...

How can I declare an XML string in my Java application?

I'm using kXML in my Blackberry application using Java. I want to create a string that has the xml information I need for testing purposes. Any guidance? For example: String theXML = @" <xml> </xml>"; ...

Unix timestamp to XML date time conversion

Is there any C++ Library api available which converts Unix timestamp to XML datatype datetime eg : http://books.xmlschemata.org/relaxng/ch19-77049.html I am looking to convert into pattern : 2001-10-26T19:32:52+00:00 I also have access to mysql, so I can get hold of : mysql> select now(); +---------------------+ | now() ...

I'm using Ajax to populate my web page, but the populated HTML isn't working

I'm using Ajax to dynamically populate a DIV. I have each page content stored in XML files as CDATA. When a user clicks on a link from the navigation bar, the Ajax loads the XML for that particular page, parses it, and populates the DIV with it's content. Everything is working GREAT, except for one thing. I have a jQuery modal popup who...

simpleXML returns empty element

I got a problem reading an XML-Feed Sample of the XML File: <f:feed xmlns:f="http://www.bbgo.de/feedxml/feed" xmlns:a="http://www.bbgo.de/feedxml/article" xmlns="http://www.w3.org/1999/xhtml" f:customer="blub" f:name="dax-tecdax"> <f:title>Analysen: DAX, TecDAX</f:title> <f:date>2010-09-22T20:46:29+02:00</f:date> <f:url>http://www.bbgo....