Questions tagged "xml" (page No.1)

Calculating relative time

Given a specific DateTime value, how do I display relative time, like 2 hours ago 3 days ago a month ago etc...? ...

Using WPDB to output raw XML fails because of wp-blog-header.php

I'm coding a plugin. One particular file of this plugin is supposed to pull data from the plugin's custom DB table, and output it with minimal processing as raw XML. The problem is, to get the WPDB class to work when the file was opened directly, I had to add a ...

I want to create a multi-tabbed spreadsheet using coldfusion

I am trying to create an Excel spreadsheet (having multiple worksheets and nested tables) by using ColdFusion 8. Although I came across quite a few solutions , I still can't find anything for my specific requirements, which is to make the spreadsheet contain multiple worksheets and each worksheet will contain ...

Spacing in Linear Layout not working as expected

A partner of mine created this xml layout and now I am trying to tweak it to look a bit more polished. Essentially, all I would like to do, is take the 4 buttons listed in the Linear Layout and reduce the vertical space between them, such that they are ...

How to code a android user interface design?

I was just looking at a project on kickstarter, Pixate: http://www.kickstarter.com/projects/pixate/pixate-beautiful-native-mobile-apps-with-css?ref=live Basically you can use css to natively theme Android. Are there any libraries already there for Android to do something like this? or something in another language or something similar? I want to code better designs like this: ...

Javascript Xml Count

Sample XML. <node> <nodeid>28</nodeid> <account_no xsi:nil="true" /> <address1>15 CANCUN CT</address1> <serial_no>112199543</serial_no> <x_lat>25.95513358000</x_lat> <y_lon>-97.49027147000</y_lon> <alarm> <alarmid>Outage</alarmid> <alarmtime>2012-07-30T14:46:29</alarmtime> </alarm> <alarm> <alarmid>Restore</alarmid> <alarmtime>2012-07-30T14:55:29</alarmtime> </alarm> </node> <node> <nodeid>67</nodeid> <account_no>274192</account_no> <address1>1618 CHIPINQUE DR</address1> <serial_no>112199521</serial_no> <x_lat>25.95286395000</x_lat> <y_lon>-97.49323166000</y_lon> <alarm> <alarmid>Outage</alarmid> <alarmtime>2012-07-30T14:46:29</alarmtime> </alarm> </node> </ROOT> I want to count the number of <alarm> elements the first node has as well as the second. I tried to do this in a for loop... xmlDoc.getElementByTagName('alarm')[i].length; this gives me all number ...

Generating 3 lists instead of 1 with xslt

I've reevaluated my last question after discussing it with a member here. This is what I came up with. Using xslt, I want to format some xml data into 3 side-by-side lists. The XML I'm working on looks like this: <Search_Results> <All_Results> <Result> ...

XML Output as text in mobile browsers

This one has been puzzling me for a while. I have this website here (http://www.thewildgoosegrill.ie/) it shows fine on desktop browsers including Safari and the iPad. When I load it on Dolphin, Safari on Iphone, the page displays as text without html formatting. I included this line here to make it ...

Serialize a private backing data member in .NET 2.0?

I am writing a small xml config file that will be saved and loaded from a specific location (so no using user.config). My application is .NET 2.0 and can not be moved to a newer version (so no DataContractSerializer) I am required to implement a "Save Password" option so the ...

Python etree xml write issues

I'm trying to write multiple files to a directory with very little changed in between each file (eg. incremental id numbers) When I try run my program, it fails after writing about 5 files. But when I try it again and re-select the source file, it works. Here's ...

insert a character into a field based on If statement

I am not very familiar with XSLT. Basically, I have an array of items in my original XML, it looks like this: Sample input document <Items> <Items>Item1</Items> <Items>item2</Items> <Items>Item3</Items> </Items> Expected output document from sample input <Items> <Items> ...

How can I ignore the !DOCTYPE declaration with XSL?

Here is a basic XML file with a DTD file declaration: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE article SYSTEM "blahblah.dtd"> <root-node></root-node> I found this XSL solution at http://www.stylusstudio.com/xsllist/200104/post90620.html, which is not working: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> ( ...tested at http://www.w3schools.com/XSL/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog_ex2 ) So, is there any other way ...

Read xml attribute in C#

I have been searching this for a while and cannot find a solution. I have an xml that is returned from a HttpWebRequest that I load into an xmldocument and I am trying to get a specific attribute (status) of the request. The xml that is returned is ...

How can I get my XML tags to be all on one line, but seperately using Notepad++?

So I have to do a lot of work with an XML document editing a lot using find and replace, the bad thing is all of the tags are on different lines, some are on one line but most not. Here is an example of what they look like: <Data StartTimecode='00:00:24:17' EndTimecode="00:00:29:08" ...

XML is crazy. It is not showing real position of elements

I'm having problems with a layout. I have this structure: <ScrollView> <LinarLayout> <Button/> <RelativeLayout> <ImageButton/> ...

XSD Schema for XML Element which has a value and an Attribute

How could be XSD for this element? <Message isEnabled="true">Message body</Message> I have searched in Google but there are only examples where Message is a complex type, not element with type. Or this is wrong format for XML at all? ...

Pulling the value from parsed XML in Python (only)

I am trying to pull a value (only) from some XML in Python using Beautiful Soup (but I'll gleefully dump it for anything else if recommended). Consider the following bit of code; global humidity, temperature, weatherdescription, winddescription query = urllib2.urlopen('http://www.google.com/ig/api?weather="Aberdeen+Scotland"') weatherxml = query.read() weathersoup = BeautifulSoup(weatherxml) query.close() print weatherxml This prints out the weather forecast for ...

Removing attribute from the entire XML file using XSLT

I have to remove a particular attribute from the entire XML file while transforming it into other XML using XSLT. I have to remove 'onclick' event from the entire document, whenever it occurs. Input file: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ...

Transforming multiple XML/XHTML/HTML file with XSLT using Java Program

I want to take multiple input files (XML/HTML/XHTML) and corresponding XSLT to produce the output file for the corresponding Input file. If there is only one input XML file and one input XSLT file then from the following program I'm able to transform it successfully. E.g In the give program my ...

« Previous12345678910 ... 23182319Next »Show All