xml

How to get search results in XML format

Hi, I am planning to make an iPhone search app. the user types in the search string. the string will be searched by some search engines like Google, Live, Yahoo ... I need to get the search result in the XML format. Is there any way to do this. Help needed. Please. Thanks and regards, Shibin ...

Create XML DocType element

Hi all, Please I am working with IBM message broker, and I want to know how to create (in java/esql) DOCTYPE element in a message as the following: <!DOCTYPE COMMAND PUBLIC "any//DTD any//EN" "xml/command.dtd"> <COMMAND> ...... <COMMAND> I tried: MbElement root = outMessage.getRootElement().getLastChild(); MbElement xmlDocType = r...

Apply XSLT on in-memory XML and returning in-memory XML

I am looking for a static function in the .NET framework which takes an XML snippet and an XSLT file, applies the transformation in memory, and returns the transformed XML. I would like to do this: string rawXml = invoiceTemplateDoc.MainDocumentPart.Document.InnerXml; rawXml = DoXsltTransformation(rawXml, @"c:\prepare-invoice.xslt"))...

java.net.URISyntaxException

Hi, I have get this exception. but this exception is not reproduced again. I want to get the cause of this Exception Caught while Checking tag in XMLjava.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Documents and Settings\All Users\.SF\config\sd.xml stacktrace net.sf.saxon.trans.XPathException. Why this ex...

c# webservice return XmlElement

Hi I have problem with return XmlElement, who has value only firstchild of soap response. Soap Response looks like this: ResponseCode: 200 (OK) Content-Length:537 Cache-Control:private, max-age=0 Content-Type:text/xml; charset=utf-8 Date:Tue, 18 May 2010 10:13:57 GMT Server:Microsoft-IIS/6.0 X-AspNet-Version:1.1.4322 X-Powered-By:ASP....

Manipulating existing XDocument (fails)

Hi there, I got the following Code snippet from my Silverlight Application: var messages = from message in XcurrentMsg.Descendants("message") where DateTime.Parse(message.Attribute("timestamp").Value).CompareTo(DateTime.Parse(MessageCache.Last_Cached())) > 0 select new ...

Advanced replace in C#

Hi, I like to replace some attributes inside a xml (string) with c#. Example xml: <items> <item x="15" y="25"> <item y="10" x="30"></item> </item> <item x="5" y="60"></item> <item y="100" x="10"></item> </items> In this case I like to change the x-attributes to the combined value of x and y. Result xml: <items> <item...

convert string to a xml file ?

Hello All, How to save a well formed xml string to a xml file ? Thanks in advance... Hi All.... I got the answer XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml("WellFormedXMLString"); xmlDoc.Save(@"drive:\name.xml"); ...

GWT + XML documents with namespaces

I'd like to get a quick overview of available solutions (libraries, ...) that allow me to work with XML documents with namespaces on a DOM level - in GWT's client side. Additionally, I'm looking for an XPath solution that can work on that DOM (even if it requires writing my own XPath Navigator). XML parsing and serialization isn't nece...

Store Exchange 2010 Emails in SQL

I have an application which will start a program flow with the arrival of an email. I will need to link the email to my application, which I'm going to do via a custom property on the message. I will then need to store the email for reference forever. As Exchange 2010 supports only 10Gb and 100,000 items in a mailbox (without using PS...

e4x statement conflicts with local variable?

Hi, griends! Somewhere in code i have decalred variable: [Bindable] var nameWin:String = ""; after this i have an e4x statement podContent.xml_m = xml_m.item.(nameWin=="necessary name"); that should compare item's namewin with "necessary name" and return only items whose nameWin matches with "necessary name". xml_m.item: <item>...

How can I create a GUI on top of a Python APP so it can do either GUI or CLI?

Hello, I am trying to write an app in python to control a motor using serial. This all works in a CLI situation fine and is generally stable. but I was wondering how simple it was to add a GUI on top of this code base? I assume there will be more code, but is there a simple way of detecting something like GTK, so it only applied the co...

Parsing log files in a folder in ColdFusion

The problem is there is a folder ./log/ containing the files like: jan2010.xml, feb2010.xml, mar2010.xml, jan2009.xml, feb2009.xml, mar2009.xml ... each xml file would like: <root><record name="bob" spend="20"></record>...(more records)</root> I want to write a piece of ColdFusion code (log.cfm) that simply parsing those xml files....

Flatten and convert a large amount of XML files to a Table

Hi, I have a huge number (2k+) of xml files that I need to extract data from and dump that data into a table of some sort (Excel or simply one or multiple XML files would be fine). The fun part is that the xml files have wildly differing amount of nodes (with occasionally the same names in the subnodes) and also the depth of the hierarc...

Given an XElement, how do I retrieve a reference to another relative XElement/Xattribute given an XPath?

Given the following XML: <SomeXML> <Element1> <Element2 Attribute3="Value4" /> </Element1 </SomeXML> ... and an XElement reference to 'SomeElement' and an XPath 'Element1/Element2/@Attribute3' How do I retrieve a reference to Attribute3 so that I may alter it's value (using the Xpath)? The XPath is to be a retrieved ...

Messing with Encoding and XslCompiledTransform

Hello, im messing with the encodings. For one hand i have a url that is responding me in UTF-8 (im pretty sure thanks to firebug plugin). Im opening the url reading the content in UTF-8 using the following code: StreamReader reader = new StreamReader(response.GetResponseStream(),System.Text.Encoding.UTF8); For other hand i have a ...

How to pass an xpath into an xquery function declaration

Hi all, I use Apache Tomcat's Exist DB as an XML database and am trying to construct a sequence by passing the following xpath, defined in FLWOR's 'let' clause: $xpath := $root/second/third into a locally defined function declaration, like so: declare function local:someFunction($uuid as xs:string?, $xpath as xs:anyAtomicType?) { l...

Why can one null return be tested but another throws an exception?

I want to test if an xml attribute is present. Given this: XmlAttributeCollection PG_attrColl = SomeNodeorAnother.Attributes; This first test works: if (null != PG_attrColl["SomeAttribute"]) "GetNamedItem" is supposed to return null, but the following test throws an exception complaining about the null it returns. if (null != P...

SQL Server "for xml", multiple tables, multiple nodes

Is it possible to select multiple tables at once? For example, I can do: SELECT ( SELECT * FROM Articles FOR XML PATH('article'), TYPE ) FOR XML PATH('articles'), ROOT('data') and SELECT ( SELECT * FROM ArticleTypes FOR XML PATH('articleType'), TYPE ) FOR XML PATH('articleTypes'), ROOT('data') Can I join both so that I get ...

Detecting a response from an api

I am currently working with an API, currently the sequence of events is I send an XML request to the api provider and it responds with a response in the format of some XML also, I was hoping there would be a way for me to detect when this reponse is sent back so I can show the user a loading message while the response is sent. Ideally I ...