xml

Creating an XElement item in a Linq expression

I’m using Linq to create a list of objects. Shown below is the expression I am using. The problem I have is that at runtime it isn’t happy with the “RawXMLDocument = XElement.Parse(t.Message)” line. The “RawXMLDocument” property takes an XElement. Is there a way to convert the string version of the XML (held in Message) into an XElement ...

how to deserialize this xml in Silverlight

Xml is here <?xml version="1.0" encoding="utf-8"?> <s> <Items> <b name="test" width="100"> <Items> <d x="1"/> <e width="50"/> </Items> </b> <b name="test2" width="200"> <Items> <d x="2"/> </Items> </b> </Items> </s> I'm creating those classes public class s { public s(){ Items=...

java find value of an xml attribute

Hi this is my xml : <-tobject.subject tobject.subject.refnum="01016000" /> <-tobject.subject tobject.subject.refnum="10004000" /> I want to extract 01016000 and 10004000 from it . I used this code: NodeList nodeLst4 = doc.getElementsByTagName("tobject.subject"); if (nodeLst4 != null) { int numberofCOdes = no...

Database table to XML document?

Basically I have a asp.net that I need to display an XML document (straight xml, with the tree nodes) I have the sql statement which returns the row names and each one of their values. Just wondering how I should go about doing this? SQL Server 2008, my query is just a select * from offices, my results is "1","New York","New York City"...

Can not load XML into Properties Object Java

Hi I have a problem when trying to load an XML file into Properties Object in Java. This is what I am trying to do: public class loadXML() { private dbConn public loadXML(Connection currConn) { this.dbConn = currConn; } public Properties populateProperties() { ResultSet rst; Statement stmt; Connection con; Pr...

Convert xml string to XML document in Internet Explorer - C#, ASP.NET

I have converted a table as an xml string that looks something like <NewDataSet>\r\n <officelist>\r\n <OfficeID>2176</OfficeID>\r\n <Office>My Office </Office>\r\n <Region>Toronto</Region>\r\n <Division>TO </Division>\r\n How do I get this to a strict xml page where you can open and close the nodes (in IE) – like this xml feed ...

Jersey Consumes XML post

I want to make a Post to Jersey Rest service. What is the standard way of doing this? @Post @Consumes(MediaType.Application_xml) public Response method(??){} ...

Android: Add a textview to linear layout programmatically

Hi, I am trying to add TextViews to my xml-defined layout in code. I have a xml-sheet, where a lot of Views are defined. But I have to add some views in code, so a create a LinearLayout in the xml-sheet: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:id="@+id/info" a...

[jQuery] Get first child of xml node

Hi, I have this xml file. I would extract the first child of Status node and alert it. How I can do it? <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns3:ExecuteResponse xmlns:ns1="http://www.opengis.net/ows/1.1" xmlns:ns2="http://www.w3.org/1999/xlink" xmlns:ns3="http://www.opengis.net/wps/1.0.0" statusLocation="http://r...

C++ code/XML generation tools

I'm not sure what exactly the right term is, kind of like ORM using XML as the data store. Are there any decent tools which will autogenerate C++ classes (including data and serialization/deserialization) based on an XML schema? Or will create XML-sync code and schema based on a C++ class definition? TinyXML is great but it's so old-sch...

How RSS reader knows which items I've already read, and which I have not?

Hi everyone, I've tried to find some info on the Internet, but couldn't. I'm new to iphone development, but I have already learnt something. I've created application which parses RSS feed and shows it, but I haven't got a clue how to show user which items he has already read and which hasn't. I have some ideas but I don't know are they ...

Changing an XML Child Element into a Parent

I have an xml document that has a structure like so: <?xml version="1.0" encoding="iso-8859-1" ?> - <newdataset xml="version="1.0" encoding="iso-8859-1""> - <officelist> <officeid>2</officeid> <office>Office</office> <region>BC</region> I would like to have the office id = 2 to be its own element. Like so <?xml version="...

Updating an attribute in XML with MySQL

I have a chunk of XML stored as a string in a MySQL database, and need to update one of the attributes using a query. Given the following string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <town> <road name="Main" direction="north"/> </town> I would need to change it to update the attribute direction to a differe...

XML Serialization/Deserialization per item

hey I'm designing a car catalogue and need to use XML files for storage. In previous projecs, I was manually editing XML files with Linq. However, I came across XML serialization and am thinking this might be a better approach. Each item in the catalogue would be of type CarItem and contain various attributes. The catalogue can contain ...

Remove special characters from XML via XSLT only for specific tags

Hi everyone, I am having a certian issue with special characters in my XML. Bascially I am splitting up an xml into multiple xmls using Xalan Processor. When splitting the documents up I am using their value of the name tag as the name of the file generated. The problem is that the name contains characters that arent recognized by the ...

Client side XSLT transformation of someone else's XML.

A third-party supplier is providing me with some XML, that one of my applications is happily processing. For debugging reasons, I want to look at it, but it doesn't display anything in the browser, and I (and other members of my team) have to viewsource to look at the (ugly) XML. This sounds like a classic use-case for XSLT, I thought. ...

Printing rss using PHP!?

I am trying to use an rss feed from a domain that does not have a crossdomain file and because of that I am going to use a web service in the middle where I will be just getting the rss feed from a url (let's say the url is: www.example.com/feed) and then just print it to a page. The service would work like: www.mywebservice.com/feed.ph...

JAXB - how to unmarshall this XML?

Theres some pretty nasty XML that i'd like to unmarshall to a java object using JaxB. Most of it has seemed quite straightforward so far - but I am kinda stuck on this: <assets> <asset type="fixed">74,414</asset> <asset type="current">1,022,069</asset> <asset type="other">0</a...

How parse remote XML file with jQuery

Hi! I use this script to parse an XML file with jQuery, but it run only if I have the XML file in local server. Do you know how can I parse an XML file on remote server? <script>$(document).ready(function(){ $.ajax({ type: "GET", url: "http://www.myotherwebsite.com/folder/myfile.xml", dataType: "xml", success: function...

How do RSS readers read different feeds?

Hi everyone, sorry for a silly question, (I know it is). I didn't work with RSS before and I have a question. I wrote an RSS reader for iphone which can read one particular feed, if I try to read some other feed it doesn't work properly, I have some data missing, or sometimes it even crashes. Ok, it is naturally enough, because different...