xml

How to print the value of an attribute in jsp/dom

I'm trying to print out an attribute value with the following code: ArrayList arrayList=new ArrayList(); String = "tagToFind"; Node n = node.getParentNode(); String printOut = ""; while (n != null && !n.getNodeName().equals(tagToFind)) { n = n.getParentNode(); } if (n != null){ arrayList.add(n.getNodeValue()); out.prin...

iphone: Getting xml with UIWebView?

Hi guys I have the following url http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured?&start-index=1&max-results=15&v=2 I am trying to load it in UIWebView and then use javascript to get its contents, and parse it with NSXMLParser. My code looks like that: -(void)startDownloading{ NSString *urlStr = [NSS...

parsing XSD with ruby

Hi i have a XSD that i want to parse. Note that i don't want validate it against a XML but get all enumerations that i have there. For example <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <xsd:simpleType name="fruitNames"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="banana" /> <xsd:enumeration valu...

XML "not well-formed (invalid token)" error from FlickrApi

First of all : I'm using the well known (and tested I suppose) flickrapi. I was testing synchronization of flickr photos with my project and everything worked fine till I reached some specific files. Then python's xml parser failed to parse xml to string (and error from topic). Debug gave me line and column in the xml, so I've exported i...

Reading and writing into the XML file

Hi, I need to work on XML files using Delphi. I want to present the xml data in a DBGrid to the user and save the changes done by user in the XML file. For example in the below xml (which was presented to the user), if user changed City of ABC under client and added a new customer with NickName as "AAA" those changes should be reflec...

how to query for xml attribute after select change

Hi all, I have successfully loaded the xml and everything works fine if the success function runs right after loading the XML. But I wanted to get the value of the attribute after the onChange event takes place on the select box (which changes tmpproj value). When I try to access the success function checkimgs() it says $(xml) is not de...

Displaying feed from remote url - please help!!

I've been searching for a day now - so any help at all would be so greatly appreciated! I have a URL for a feed in xml format - it doesn't have an xml extension, so after some searching I found this code example to extract the information from the feed and create my own locally saved xml file: <?xml version="1.0" ?> <?xml-stylesheet hr...

Error while trying to use Sax Parser on xhtml file

Hi! I'm trying to parse an xhml file using SAXParser in Java, but gets an exception: "java.net.MalformedURLException: unknown protocol: g" The line made that exception was: SAXBuilder.build(Destination) While Destination is the full path to the xhml file. The beginning of the xhml file is as followed: <?xml version="1.0" enc...

XElement Save question

I have to create a backup XML file every few minutes, here's the current code: XElement xml = new XElement("Items", new XElement("Backup", new XElement("Console", consoleName), new XElement("Begin", beginTime), new XElement("End", endTime), new XElement("Time", tota...

Java XMLInputFactory - Cut's text when reading data with .getData()

I'm using XMLInputFactory to read data (sql query's) from xml file. In some cases, the data is truncated. For example: select CASE WHEN count(*) > 0 THEN 'LX1VQMSSRV069 OK' ELSE 'LX1VQMSSRV069 NOK' END from [PIWSLog].[dbo].[log] is read as (text is truncated after the last '.'): select CASE WHEN count(*) > 0 THEN 'LX1VQMSSRV069 OK' E...

How to creating an XML File from a XmlReader?

How do you write an XML file from an System.Xml.XmlReader. i tought this would be a simple question but whenever i search i seem to be ending up with reading the file to a reader or writing node by node. the writer contains an xml that was stored in database and just needs to come out of the database to a file. Is there any easy way to...

How do I add a namespace prefix to each node using TXMLDocument

I used the XML Binding Wizard to create a descendant of TXMLDocument. The files generated by this class would declare the namespace in the root node and create just plain, unadorned nodes for the rest of the document. <?xml version="1.0"?> <RootNode xmlns="URL" xmlns:xsi="URL" xsi:schemaLocation="URL"> <SomeNode> <AnotherNod...

Quickest way to add XElements to a collection

I am populating an XML structure (using VB.NET) to pass to a web service. Here is how one piece of the structure is filled, and the rest of the structure is filled in a similar manner: Private Shared Function GetSpecialties(ByVal specialties As System.Data.Linq.EntitySet(Of Provider.provider_specialty)) As XElement Return _ ...

iso-8895-1 to xml acceptable UTF-8

Hi Guys, I am parsing text/html from web pages into an xml feed, the text/html is encoded iso-8895-1 while the XML feed must be UTF-8. I have used html entities, but am having to manually replace loads of characters, here is what I have so far (still not parsing all text) $desc = str_replace(array("\n", "\r", "\r\n"),"",$desc); $de...

Invalid Assembly XML File

Hi, I am trying to read the XML Documentation file (C#) using this ocde - Type classType = typeof(Point); string documentationFileLocation = classType.Assembly.CodeBase; if ( !string.IsNullOrEmpty(documentationFileLocation) && documentationFileLocation.StartsWith("file:///") ) { documenta...

Zend_Config_XML encoding issue

Hello I am creating a XML navigation for my website. This line below is causing a simpleXML issue: <label>Osnabr&Atilde;&frac14;ck</label> My PHP code, using HTMLentities has changed Osnabrück into Osnabrck . However, when trying to parse my XML with this line in it, I get this error: /application/configs/navigation.xml:318: parser e...

internet explorer outputs nothing when doing jQuery AJAX .get call - other browsers are fine

Hi guys, i hope you can help me with this one. The code is supposed to display mysql data using a php script returning XML (the backend script works fine delivering good XML - checked with my previous question on Stack Overflow). I'm using jQuery 1.4.2 to do a .get AJAX call - and i just can't get Internet Explorer to display even a bi...

Android: Changing Home Background

Is it possible to change the background image of the home screen from an app? If so how? If not, well, just say so. Thanks in advanced! ...

Jersey web services multiple formats

In following method: @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN}) @Path("{id}") public String getMessage(@PathParam("username") String username, @PathParam("id") int id, @QueryParam("format") String format) { return "test"; } how do I return the the data in the specific fo...

HTTP Post XML document - server receives only first line

I have C# application that sends an XML document to a server via HTTPS Post. The problem is that the server receives only the first line <?xml version="1.0" encoding="UTF-8"?>. Here is a truncated version of my code (important parts only). What could be causing this problem? Is there modify in my code? SSL connectivity to the server...