xml

create xsd schema with <any> node that contains attributes

Hello all, I want to create an xsd schema with an xs:any element that contains an attribute. something like this <xs:element name="Task"> <xs:element name="any" type="xs:anyType"> <xs:attribute name="type" type="xs:string" /> </xs:element> </xs:element> But apparently this is not a valid schema. What I want to accomplis...

how to refer xml file from client side application which is generated by webservice

This is my code on the webservice which sucessfully creates the xml file and saves at particular destination folder. public bool GetList(string keyword1, string streetname, string lat, string lng, string radius) { XmlDocument xmlDoc= CreateXML( keyword1,streetname,lat,lng,radius); xmlDoc.Save(@"C:\Documents and Settings\block\Bloc...

Strange UTF8 string comparison

Hello guys, I'm having this problem with UTF8 string comparison which I really have no idea about and it starts to give me headache. Please help me out. Basically I have this string from a xml document encoded in UTF8: 'Mina Tidigare anställningar' And when I compare that string with the exactly the same string which I typed myself: 'Mi...

Add xmlns="" in the xml

I am getting response XML, in that I want to add xmlns attribute in each child node which is generated. Present output: <createProfileResponse xmlns="http://services.profile.webservices.ecaas.com"&gt; <createProfileReturn>STRING</createProfileReturn> </createProfileResponse> Required output: <createProfileResponse xmlns="http:/...

JPA support for XML datatype columns

For a new project we are starting (which uses JPA 2 on top of Hibernate 3) we need to be able to store XML documents and then query on their content and structure at a later date. The databases we would like to support are DB2, Oracle and SQLServer. I know all three DB vendors support native XML querying (using SQL and XQuery like state...

What is allowed in Restricted XPaths (constraints)?

I need to apply constraints in a large XML file, like this: <library> <book> <bookAuthor ID="1" nameAlias="PeerBR jr"/> </book> <book> <bookAuthor ID="1"/> </book> </library> <authorCatalogue> <author ID="1" name="PeerBr"/> </authorCatalogue> I need each bookAuthor's ID to refer to a valid author. ...

data lost in simplexml_load_string

I am reading xml with this code. $xml = simplexml_load_string($data); it reads correctly, and can access to data via $xml->title etc. but i need to access to CDATA and <media:xxx> tags. example of xml: pastie from: http://www.metacafe.com/api/item/4779040/ is possible to parse that data? how? sorry for my english! :) ...

Forward/Reverse link possible with emacs/XML mode?

I asked similar question about HTML, but I want to know if emacs XML mode has the feature. Is there 'M-x browse-url-of-file' equivalent in XML mode? I mean, is there any key that can pop up xml editor (XMLEditor or similar)? Is there any XML editing tool to enable the reverse link back to emacs XML mode? ADDED Based on slomojo's com...

JQuery method to get one node - rather than find();

I've been googling this for an hour and can't seem to find the answer. I'm using $(xml).find('title') -- but it seems to be returning all the "titles" in all nodes. How do I just grab the title within the root node? <response stat="OK"> <title>Some Document</title> <menu> <item> <title>Some Title</title> ...

Sql For Xml Path get node count

I'm trying to use the 'For Xml Path' T-SQL to generate a comma separated list of values from a column. This seems to work great, but the problem is I would like to get a count of the items in the comma separated list. Here is an example of the code I am using to generate the comma separated list: Create Table #List ([col] varchar) Inse...

Using XML class Attributes, how to represent an XML tag with both inner text and attributes?

Lets say I have this XML file: <weather> <temp>24.0</temp> <current-condition iconUrl="http://...."&gt;Sunny&lt;/current-condition&gt; </weather> I'm trying to create a C# class to represent this using Attributes in order to call XmlSerializer and have strongly typed tag access. I think the structure will look something like thi...

Oracle XML DB Annotations

I have registered one XSD in oracle XMLDB. Also I have annotated one element as a CLOB as shown below. <xs:element name="data" xdb:SQLType="CLOB"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:anyAttribute processContents="lax"/> </xs:extensio...

Using xPath to find the value of a child node

I am using xPath to do some ETL work from a dictionary lookup file. I need to be able to look for the translation key and return the translated value. For example I need to be able to look for "prioremployment" and have it return "Prior Employment". This will return an array of all the translate nodes (I am using ColdFusion 9): XMLSea...

How do you take an XML file and insert its values into a database table using SSIS (SQL Server 2005)

I have XML (see below). I need to insert the records in this XML file into a SQL Server 2005 table using SSIS. I'm stuck with the xsd file description. Within Visual Studio when I click the Generate XSD button I get the message "Unable to infer the XSD from the XML file. The XML contains multiple namespaces." Does anyone know of a g...

Use Nokogiri to get all nodes in an element that contain a specific attribute name

Hi, I'd like to use Nokogiri to extract all nodes in an element that contain a specific attribute name. e.g., I'd like to find the 2 nodes that contain the attribute "blah" in the document below. @doc = Nokogiri::HTML::DocumentFragment.parse <<-EOHTML <body> <h1 blah="afadf">Three's Company</h1> <div>A love triangle.</div> <b b...

is XmlFormat() always better than htmlEditFormat()?

Saw a comment today at: http://www.bennadel.com/blog/2004-Escaping-Form-Values-Understanding-The-ColdFusion-htmlEditFormat-Life-Cycle.htm by Rick Osborne I've started moving my students from htmlEditFormat over to xmlFormat. As you said, it catches more characters, but it's also useful for pure XML and is faster to type. I ha...

Passing Variables from Flash to PHP

Creating a flash project where users can visit the site, and turn off/on objects in a house (ie. lights, tv, computer, etc.) The next user who will visit the house in the website, will see what lights or house appliances were left on. Flash variables are passed to PHP, and those variables are saved in an XML file. (For testing to see wha...

Text wrap in TextView within a Tab

First off, sorry about the large screen. I am trying to get the text to wrap but am currently unable to do so. I have tried android:layout_width="fill_parent", android:scrollHorizontal="false", android:width="0dip" all of which suggested in another question. Does anyone have any idea how I can achieve text wrapping? Here's a sample of ...

Android internal autoscaling feature only for large screens

Hi, i am developing a game with canvas. I want use the Android internal autoscaling feature (anydensity=false;) only for large density screens. Is it possible to enable this graphics (in the drawable folder) scaling function only for large screens. For smallscreens my Game Engine does automatically manage the presentation. I attempted ...

simple rss feed

hi, i am trying to make a simple rss feed but the problem is when i run the file is says would you like to open rss.php ... here is the code maybe im doing something wrong? i have put it in this format just to see it work. <?php header('Content-Type: application/rss+xml; charset=utf-8'); ?> &#60;?xml version='1.0' encoding='ISO-8859-1'...