xml

Convert an xml element whose content is inside CDATA

I have a xml fragment like below <Detail uid="6"> <![CDATA[ <div class="heading">welcome to my page</div> <div class="paragraph">this is paraph</div> ]]> </Detail> and I want to be able to change the <div class="heading">...</div> to <h1>Welcome to my page</h1> <div class="paragraph">...</div> to <p>this is paragrap...

JQuery AJAX GET returning an empty file

I am trying to grab http://lib.softvoyage.com/cgi-bin/gate_dest_hotels.xml?code_ag=nwi&amp;alias=tpi&amp;language=en&amp;with_cdata=y via AJAX however it keeps returning nadda (firebug screenshot here: http://img683.imageshack.us/img683/3279/firebug.jpg) Below is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...

Customize Node Names in Ruby's Builder

I'm building a tool that generates dynamic xml. As a result my Models have pretty generic names: Project has_many :Groups Group has_many :Items has_many :Groups belongs_to :Project Item has_many :Params belongs_to :Group Param belongs_to :Project belongs_to :Group belongs_to :Item So when I build...

bash script to translate XML

Hi I have dozens of XML files with I would need this: <p begin="00:06:28;12" end="00:00:02;26"> translated into this: <p begin="628.12" end="631.08"> I know i need a simple awk or sed to do this, but being new; can someone help ...

Why does this XML query not work?

Heres some code for a test case. I don't understand why the first two queries produce a result but the third one doesn't. Any ideas? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onInit();" > <mx:Script> <![CDATA[ private function onInit...

Special Character in XML Attribute Value

I want to put a colon in an attribute value that is used to display the title of a chart on my webpage. I have something like: <chart displayname="This is the chart name" resource = "blah blah blah" /> I want the display name to be something like "This: is the chart name" How can I accomplish this? Thank you for your help. If it he...

What is the Flex/AS3/E4X equivalent of this xpath query?

Given this document: <doc> <element> <list> <key attr='val'/> </list> </element> <element> <list> <key attr='other'/> </list> </element> <element> <list/> </element> </doc> I want an e4x equivalent of the xpath //element[list/key/@attr="val"]. Is i...

Deleting XML elements in WiX

How do you delete/remove an element from an XML file in WiX? ...

Php reading xml in post request

So, I have perform two steps a) Create a some random xml file in one of the php file. b) Parse the same xml file in second file. Key points are that php file in a) will issue a post request to php file b) with only xml as its request. file b) will have to read the xml file using SImpleXml. I am trying to do something for this htt...

Send XML String With HTTP Post In Actionscript 3

Hello, I am having a little trouble sending an xml string to an HTTPService an Actionscript3 (see code below). Basically, I am trying to send a georss xml string for conversion into another format. I am getting an ioError and suspect the xml is causing havoc with the services parser. I know this approach is probably not the best, but...

PHP & XML parsing

I have searched everything on google and still i cant seems to find a solution for this. Basically im helping my friend to create a php frontend for his ftp. The ftp details are saved in xml. So i have to parse it to a php. <FileZillaServer> <Users> <User Name="anonymous"> <Option Name="Pass">aaaaaa</Option> <Option Name="Group"/> <Opt...

How to change string resource xml values in Android programatically?

Hi All, Is there any possibility to Edit String.xml values in Android? Please suggest me the possible ways. I want to provide Enable/Disable option for my App. To accomplish this I can use SQLite database. But I doesn't like to Use DB for a single variable value. Thanks in Advance. With Regards, Raghavendra K. ...

SQL Server 2008 shredding XML data - cant get element text in rowset!

Please consider this simple example. I can't get the text of the state element 'red' or 'blue' Please help!!!!! this is driving me batty DECLARE @xml XML; SET @xml = '<capitals> <state name="Alabama" abbreviation="AL" capital="Montgomery" >red</state> <state name="Alaska" abbreviation="AK" capital="Juneau" >bl...

How do I use an environment variables in xi:include of a XML file?

I would like to use an environment variable in the href link of the xi:include node of an XML file. Currently the Perl XInclude parser doesn't support any variables but only absolute paths. Is there a method where this can be overcome? for example, my xi:include node will look like this: <xi:include href="$GLOBAL_ROOT/alternative.xml"> ...

XML Schema - child elements dependant on existance of optional attribute

Is it possible to define in XSD the following scenario: Parent element has an attribute that is optional. If the attribute is not present in XML, at least one child element must exists. If the attribute is present, there can be zero or more child elements. Example: VALID <parent external-source="some_name" /> <par...

How do I have to change this XML string so that XDocument.Parse reads it in?

In the following code, I serialize an object into an XML string. But when I try to read this XML string into an XDocument with XDocument.Parse, it gives me this error: Invalid data at root level. The XML is: <?xml version="1.0" encoding="utf-8"?> <Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://ww...

Get the last changed date of a xml-file with vb.NET

Is it possible to geht the date, when a xml-file last time was changed. I mean the date, which you can see, if you right-click the file and click properties. ...

Is there a better design pattern/method to use?

Hello: I've currently completed one of two phases of a project that required I write database information to XML using C++. While use of a third party tool was used to do the actually formatting of XML tags and data, I still had to design a model along with business logic to take the database tables and map them into XML structures. F...

Don't show Object Tag, only it's attribues with JAXB

If I have 3 objects A, B and C. Where A has B which has C, I don't want to show <a> <b> <c/> </b> </a> I want to show <a> <c/> </a> Is there any way to do it with JAXB? ...

Apache file caching

How does apache handle caching of certain files, and is it possible to explicitly say that certain files should be aggressively cached more than others, through the standard config files for a given host or virtualhost? To put it in context, I keep a lot of site content in various XML files, and I'd like to be able to say that this fil...