xml

Will XML file I/O cause synchronization problems in php?

Now I am facing a situation that I'm building a website without mysql or any other databases. After consideration, I choose to use Xml file for configurations and data storage (And actually I have really no choice). My problem is that if different users read and modify the same xml file at one time, will there be any synchronization pr...

How can my app parse twitter (xml or json) response [200 or 401]?

How can my app parse the Twitter response when someone using a curl command, like this: curl -v -H 'X-Auth-Service-Provider: https://api.twitter.com/1/account/verify_credentials.json' -H 'X-Verify-Credentials-Authorization: OAuth realm="http://api.twitter.com/", oauth_consumer_key="**jhtmLUypg82g", oauth_signature_method="HMAC-SHA1", oa...

Transforming XML using XSLT

Hi, I have a custom XML that I need to transform to another XML format, using XSL. Input: <Feed> <repository> <item-descriptor name="product"> <property name="id">123</property> <property name="display">asdf</property> <property name="attr1">attr1</property> <property name="attr2">attr2</property> </item-descriptor> </r...

Excel to XML for data stripping

I am trying to strip data from thousands of identical Excel 2007/2010 files. I would prefer to do this using scraping techniques. Is it possible to scrape an Excel file since, as far as I know, the file is basically some sort of XML format. So, is it possible to convert an Excel file to XML or some other markup format? ...

Nokogiri XML Parsing with Rails

I looked at a lot of tuts but this one seems to have got me where I am controller def index require 'nokogiri' doc = Nokogiri::XML(open("http://sports.yahoo.com/top/rss.xml")) @links = doc.xpath('//item').map do |i| {'title' => i.xpath('title'), 'link' => i.xpath('link'), 'description' => i.xpath('description...

Creating XML and XSD files based on .NET entities

Hi I've been looking around for this for quite some time and cannot seem to get anywhere. I need to find a way to accomplisht the following two tasks, based on a .Net Entity object: Create an XML file that contains the data in this entities, complete, with cascading nodes (representing foreign key relationships, basically). I've consi...

Getting the line number and column number from a org.w3c.dom.Node

I know that you can get the line number and column number from a org.xml.sax.SAXParseException. Is it possible to get the line number and column number from a org.w3c.dom.Node? ...

Data/XML being trucated when displayed

My project downloads lots of xml (as text) and images then I parse the xml and interpret the data there. When I check some of the xml downloaded some of them are getting truncated only showing a partial part of it. The beginning parts of it is gone. I use: InputStream in; in = OpenHttpConnection(url); SAXParserFactory spf =...

SqlBulkCopy fails trying to copy a row with large content in an XML column

I am trying to copy a record from one SQL Server table to another. Both tables have the same structure, one of the columns is of type xml. Source table has a large xml content in of the rows, about 2.5Mb. I saved the content of the xml column into a file, see map.zip attached or download it from https://docs.google.com/leaf?id=0Bz4PXXE...

Magento > Backend > New Menu Item needs specific action -> How do I do it?

Hi guys! I have created a new menu in my backend, and added some children. One of these children named "Manage Pages" must retrieve all the products that correspond to the attribute sets that begin with "CMS_" and should not have a price column. I have done this so far: app/code/community/Mycompany/Content/etc/config.xml <?xml versi...

Append element with SAX in python

I know how to parse xml with sax in python, but how would I go about inserting elements into the document i'm parsing? Do I have to create a separate file? Could someone provide a simple example or alter the one I've put below. Thanks. from xml.sax.handler import ContentHandler from xml.sax import make_parser import sys class aHand...

Getting at XML files inside Android.jar.res.drawable

As I've been researching another problem online, I've seen references to folks modifying the XML files contained inside the Android.jar.res.drawable folder and then copying them to their drawable folder for use in their project. But I can't open these files, instead I get the following error. Could not open the editor: org.eclipse.ui.P...

Extract content with XPath?

I have html content that I am storing as an XML document (using HTML Agility Pack). I know some XPath, but I am not able to zero into the exact content I need. In my example below, I am trying to extract the "src" and "alt" text from the large image. This is my example: <html> <body> .... <div id="large_image_display"> <img...

Problem with singleton from xml parser. afternavigation.

after parse xml. xml attributes data i stored in NSMutableArray *anArray; which is in MyAppDelegate. I used anArray in MyAppDelegate. For my xml i do have One root Tag and N number Child tag. my xml example: <root> <child name1="",name2="",name3=""/> <child name1="",name2="",name3=""/> <child name1="",name2="",name3="...

XPATH returning no results

I have an loaded some XML in an XMLDocument object. I am iterating through the document by using an For Each node As XmlNode In doc.GetElementsByTagName("Item", [NAMESPACE]) 'Do Stuff Next I would like to use xpath within this loop to pull out all nodes with the name of "MyNode" I would have thought i would simply have to do node....

Screensaver for ubuntu that fetches online data?

Hi everyone, I got an idea last night. I have a PHP script at my web server that returns a XML or JSON array. What could I do to make a Ubuntu Screensaver to fetch this online data? ...

XMLReader -- Getting problem with utf characters

Hi, I am parsing a huge xml file and encoding of file is to be said < ? xml version="1.0" encoding="ISO-8859-1" ?>**bold The db encoding is utf8 and I am running this query before anything is saved to db $sql='SET NAMES "utf8" COLLATE "utf8_swedish_ci"'; What the problem is that sometimes some non standard characters comes in the ...

How would I call this element via SimpleXML?

How would I call this element via SimpleXML? $xml->ls:viewMinutesThisWeek definitely wouldn't work <ls:viewerMinutesThisWeek>5700</ls:viewerMinutesThisWeek> ...

How large RSS reader works (netvibes, Google reader...)

Hello guys, I wonder how web applications like Google Reader, Blogline, techronati works, and what technics they follow to parse millions of RSS feeds using cron job at one time?. Good evening, Thank you. ...

Using XSLT document() on a dynamicly generated XML in PHP

Hi, In my XSLT file. I use the document() function <xsl:variable name="Publicity" select="document('./publicity.xml')" /> and that works but if I try to link a PHP script that generate the XML dynamically, <xsl:variable name="Publicity" select="document('./publicity.php')" /> I get a Warning: XSLTProcessor::transformToXml() [xsl...