xml

trouble parsing XML in python

I'm trying to query a database, then convert the file-like object it returns to an XML document. Here's what I've been doing: >>> import urllib, xml.dom.minidom >>> query = "http://sbol.bhi.washington.edu/openrdf-sesame/repositories/sbol_test?query=select%20distinct%20%3Fname%20%3Ffeaturename%20where%20%7B%3Fpart%20%3Chttp%3A%2F%2Fsbol....

xml values are not passed to detalview for iphone

somehow its data is not transferring so i am using other method for dsiplaying but is this good for memory management ?? if ( [elementName isEqualToString:@"telnumber"]) { NSLog(@"Processing Value: %@", currentElementValue); NSUserDefaults *tel = [NSUserDefaults standardUserDefaults]; [tel setObject:currentElementValue forKey:@"key...

Unknown chr being output after XSL Compiled Transform

Hi, my code is outputting some weird character at the very start of my XSLT output XML and neither Visual Studio 2008 or notepad show it up. But it's definitely there because VS lets me delete it and will then auto-format the XML properly. How do I stop this? Here's my code: // create the readers for the xml and xsl XmlReader re...

Is there a way to correctly concatenate two arbitrary XPath expressions to result in a new valid XPath expression?

I'm looking for a way to concatenate two arbitrary, valid XPath expressions to build a new XPath expression. Effectively I'd like to apply the second XPath expression on the result of the first XPath expression. For example, take this XML: <foo> <bar> <baz /> </bar> <foo> The XPath expression /foo would obviously return the ...

Castle Windsor with XML includes, customization problem

Hi, I use Castle Windsor which is pure awesomeness :) I wire the system via XML but I have one little problem I wan't ask here. I have my core system which has it's registrations, works great so far. Then my problem arises with our customizations of the core system. Eg. - I wan't to change one implementation for another. - Add some...

Ways of Linking/Referencing XML nodes

Alright this question might sound a little bit stupid but I don't know where to start so I'll simply ask: I need a way to link or reference XML nodes among each other. So I started interviewing google and did find a few examples...yet I am not quite satisfied with the solutions i found. So i was wondering if there is a commonly accepted...

Why is this XML being output by this XSLT? I'm using the XslCompiledTransform....

Could someone tell me why this is happening, please? My XML is: <?xml version="1.0" encoding="utf-8" ?> <example xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="XMLCompositeQuoteswithSelect.xsd"> <title>some text goes here</title> <atopelem>a top elem</atopelem> <date>today</date> <a...

Using WPF to display XML

Hi Folks, I have a small project that I think WPF would be perfect for, I don't however have that much time so I am looking for feasibility information and pointers. I am trying to display a large number of items from an XML document and from what I have read so far I believe it would be possible to: Use the XML document as a dataSour...

Search Google POI (maps.google.com)

when you go to maps.google.com and search for "cupcakes" for example, you get the results displayed on a map, and on the left there is a list of results. I want the user of my application (iPhone and Web) to be able to enter a search term, then it searches on google and provides a list (much like the list on the left in maps.google.com)...

Xslt how to style conditional odd/even rows

I've an html table written using xslt transformation that looks like this <table> <xsl:for-each select="someNode"> <xsl:if test="testThis"> <tr> <!-- <xsl:call-template name="conditionalRowStyle"/> --> <td>something</td> </tr> </xsl:if> <tr> ...

Which version of Microsoft XML (msxml?.dll) to reference in my VB6 project

I am starting getting to grips with XML through VB6. I frequently find the advice to reference version 2.6 of Microsoft XML. However, on my development computer I get a wealth of choices ranging from version 2 (msxml2.dll) to version 6 (msxml6.dll) Which one to choose? ...

Extracting last character of a sentence using Regex

Hi, I want to extract last character of a string. In fact I should make clear with example. Following is the string from which i want to extract: <spara h-align="right" bgcolor="none" type="verse" id="1" pnum="1"> <line> <emphasis type="italic">Approaches to Teaching and Learning</emphasis> </line> </spara> In the ...

XSLT: Using copy-of to output xml

Hi, I am using the copy-of element in xsl to print some xml to client, but the xslt outputs the unescapes the escaped xml characters to the output e.g. if the xml being transformed is <one attr="http://one.com/page?param1=value1&amp;amp;param2=value2">    <child>text</child> </one> and if i use the copy-of to output this node <xsl:c...

Useful XML functions to improve parsing performance without looping? C#.net

Hello all I'm working on a WCF service application which does lot of manipulations on XML files. Before i start looping the nodes, elements, attributes and all the other stuffs i want to know the useful functions that are available on XmlNode, XmlElement, XmlDocument and all other Xml related classes which can be used 'in place of' loop...

Looking for a earth model that I can customize.

I am looking for some kind of earth model that at run time can pick up some data from an xml file and display it on the earth based on lan or lon etc.Is there something like that ? Any OpenGL or flash where I don't have to do coding just feed the thing.Can someone shed some light on available ways to accomplish this.Something on the line...

creating well formed XML from not well formed XML

Hi, I am having to use the following XML returned from a web service: <?xml version="1.0" encoding="utf-8" ?> <root> <staticPage> <liStaticPageID>6165</liStaticPageID> <sTitle>Ethylene</sTitle> <sPageURL>Ethylene.htm</sPageURL> <sBody> <P>Ethylene is a colourless, odourless, extremely flammable compressed gas. I...

How to convert Raw XML to SOAP XML in C#?

I have some xml generated from the XML Serializer ..How can I convert it to SOAP XML ?...I am trying to do it ASP.NET C#...please help me out ...

stripslashes and special characters?

My xml feed file is using stripslashes, but I also want to remove special characters from som fields - how would I do that and where/what order would I add it? $output .= "<address>".htmlentities(html_entity_decode(stripslashes($row->street_num)))." ".htmlentities(html_entity_decode(stripslashes($row->address2)))."</address>\n"; ...

best way to implement custom pretty-printers

The documentation for the pprint module mentions that the method PrettyPrinter.format is intended to make it possible to customize formatting. I gather that it's possible to override this method in a subclass, but this doesn't seem to provide a way to have the base class methods apply line wrapping and indentation. Am I missing somethi...

Cache XML File Java

Hi Guys, I am trying to Cache a XML File on application initialization. What would be the best approach to do it? Which would be the most efficent datastructure which I can use? The datastructure should be efficent in lookups. Thanks! ...