xml

atom namespace using linq

I have the following xml <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"&gt; <entry><id><![CDATA[text]]></id>< author><name><![CDATA[film24]]></name></author><title><![CDATA[text]]></title> <updated>2009-10-30T15:55:13+00:00</updated><published>2009-10-30T0...

XSL recursive sort

Hello, I am facing a problem where I need to sort elements, depending on their value, which contains a numbers, separated by periods. I need to sort elements depending on the value of the number before first period, then the number between first and second periods and so on. I don't know, how deep this hierarchy can go and that is the bi...

How do I render an array of Java beans to XML with struts2?

My output should be something like this: <result> <item> <id>123</id> <src>123</src> <dst>123</dst> </item> <item> <!-- ... --> </item> </result> And the action class would have a method getFoos which returns an array of uniform objects, e. g. like this: class Foo { // ... public long getId() { ... } // .....

Xml pattern restriction. Pattern for "x.x" like attribute value representing a version number

I have an XML attribute representing the version numbering of a file. The file version is identified internally by two byte fields so that, theoretically the versión could go from: 0.1 to 255.255. Is there any way to express that as a pattern restriction or any other kind of restriction in an XML Schema? Note: The problem is not restr...

Close all opened xml tags

Hello, I have a file, which change it content in a short time. But I'd like to read it before it is ready. The problem is, that it is an xml-file (log). So when you read it, it could be, that not all tags are closed. I would like to know if there is a possibility to close all opened tags correctly, that there are no problems to show it...

AS3 - multiple level loaded swfs , unloading and assigning xml

I have a Main Document class that instantiates 2 classes that control loading of two navigation grid swfs. These are populated by xml from navigation buttons on the main stage. A 3x3 navigation grid repopulates it's images and links when the buttons on the main stage are clicked Then loads the chosen video when a node on the grid is clic...

How do I resolve entities when loading into an XDocument?

I'm trying to load an XHTML document into an XDocument but I'm getting "reference to undeclared entity" exceptions thrown at me. I need to resolve entities like &reg; and &raquo;. I believe my document is properly formed, here is the head: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "...

Traverse XML to get node value

Hi, How can I traverse this XML to get the node value Mark Test 1. <gallery_index> <gallery id="0"> <property id="name"><![CDATA[Mark Test 1]]></property> </gallery> <gallery id="1"> <property id="name"><![CDATA[Mark Test 2]]></property> </ga...

Flex 3 Constraint-based Layout problem

I am attempting to reproduce a foreign language quiz in Flex. Since I'm new I can't post an image yet, but picture a box on a page with a paragraph of text inside of it. At parts within the paragraph there are drop-down boxes for users to select a particular word or phrase from a few different options. There's a "Check Answers" button at...

Why is the HTML style element content not standard XML?

I'm new to HTML, but have a long history with XML. It strikes me as odd that an HTML style element looks like this. <style type="text/css"> .style1 { width: 250px; } .style2 { width: 20px; } </style> I would have thought the same information could have been captured in a more XML friendly format. For example maybe this <sty...

Forbidden characters in xml

I have an object that I am serializing to xml. It appears that a value in one of the properties contains the hex character 0x1E. I've tried setting The Encoding property of XmlWriterSettings to both "utf-16" and "unicode" but I still get an exception thrown: here was an error generating the XML document. ---> System.InvalidOperationEx...

Easy way to load HTML content from XML?

EDIT: What I mean is displaying the XML data through HTML, not trying to get HTML into XML. Is there a simple way to load content from XML into HTML? To give you an idea, here is my DTD for the XML files: <!DOCTYPE bookreport [ <!ELEMENT page (title,author,image?,section+)> <!ELEMENT title (#PCDATA)> <!ELEMENT author ...

How do I edit a XML node in a file object, using Java

There are a lot of examples on the internet of "reading" files but I can't find anything on "editing" a node value and writing it back out to the original file. I have a non-working xml writer class that looks like this: import org.w3c.dom.Document; public class RunIt { public static Document xmlDocument; public static void m...

Persistence Using JPA Persistence.xml for Desktop App

I'm actually finishing a Desktop App That implements JPA for DB Communication. I Have a JPA Util class that does the following: private EntityManagerFactory emf = new EntityManagerFactory(); emf = Persistence.getEntityManagerFactory("default"); This "default" value is defined for my persistence.xml contained in the META-INF source fol...

"(503) Server Unavailable" with call to XSL Transform in Windows Server 2008

So I run this Windows Server 2008 security update and this code block is now throwing an error: using(MemoryStream ms = new MemoryStream()) { xslt.Transform(navigableSet, xslArgs, ms); ms.Position = 0; ret = new XPathDocument(ms); } return ret; The error is EXCEPTION [System]: The remote server returned an error: (503) Ser...

Query xml data from SQL2000 (xml saved directly in a cell, multiple rows)

Hi I get problem retrieve XML data from SQL2000 server. The table structure is as following: ID Name XML 1 Name1 <Root><DATA1>1-Data1</DATA2><DATA1>1-Data2</DATA2></Root> 2 Name2 <Root><DATA1>2-Data1</DATA2><DATA1>2-Data2</DATA2></Root> 3 Name3 <Root><DATA1>3-Data1</DATA2><DATA1>3-Data2</DATA2></Root> How can I get th...

Tweet Contest logic ( Twitter )

Disclaimer: I have no Twitter API experience nor have I used Twitter until today I've been given the task of creating a 'tweeting contest' - if anyone has Twitter API experience and/or has done this in the past, I would appreciate any useful tips that you may have. So the basic rules are that in order for a user to enter the co...

Deleteing whole sections of my XML file in C#

Alright, so here is my situation. i have a userlist for a program im designing, and all the users are stored to an XML file, like so: <?xml version="1.0"?> <Users> <User ID="1"> <nickname>Tom</nickname> <password>Sams</password> <host>[email protected]</host> <email>[email protected]</email> <isloggedin>true</isloggedin...

Cant traverse XML document

Hi, When I try to traverse to the children of the gallery node, it return nothing for the nodevalue, when it should read 'Joe Bloggs', and '#text' for the node name when it should read 'property'. Can anyone see what might be wrong with my javascript or XML. <gallery_index> <gallery id="0"> <property id="name">Joe Bloggs</proper...

Why do I need resolveexternals set to false?

Hi, I am using MSXML3 and have loaded an xml document which is a HTML page. I found that if I do not set the resolveExternals property to false (and validateOnParse to false), I get the following error: "The server did not understand the request, or the request was invalid.' 'Error processing resource 'http://www.w3.org/TR/xhtml1/DTD/x...