xml

What is the best java web application framework that goes well with xml+xslt?

I recently learned a bit about xml/xslt and would like to try it in my web project. What framework would you recommend for that? Basically, I want to generate a dynamic xml that will be applied to xslt stylesheet on the client side. Wicket was my first candidate, but it is primarily html-centric. Didn't manage to get my idea work yet. ...

How to replace xml content in conditionally selected elements using linq (VB 2008)

I'm working on a .NET application (VB 2008) that gets all of its data from a web-based Django application. I'm using Linq-to-XML and Linq-to-objects in the app. One API call is giving me XML data in the following format that I am loading into an XDocument. <django-objects version="1.0"> <object pk="1" model="app.person"> <...

How do I get my widget not to crash if there is no value in a xml node?

I'm getting an xml file and want to get data from it. The source of the xml doesn't really matter but what I;ve got to get a certain field is: tracks = xmlDoc.getElementsByTagName("track"); variable = tracks.item(i).childNodes.item(4).childNodes.item(0).nodeValue; Now this works like a charm, EXCEPT when there is no value in the node....

App.config - encrypted section error:

I have an application that encrypts a section in the configuration file. In the first time that I try to read the encrypted section from the config file I get an error message: "Unrecognized attribute 'configProtectionProvider'. Note that attribute names are case-sensitive. " config = ConfigurationManager.OpenExeConfiguration(Confi...

How to parse GPX files with SAXReader?

I'm trying to parse a GPX file. I tried it with JDOM, but it does not work very well. SAXBuilder builder = new SAXBuilder(); Document document = builder.build(filename); Element root = document.getRootElement(); System.out.println("Root:\t" + root.getName()); List<Element> listTrks = root.getChildren("trk"); System.out.println("Count tr...

Creating a Parent Node for XML document in C#

Hi My Code: // Read in Xml-file XmlDocument doc = new XmlDocument(); doc.Load("C:/Web.config"); XmlNode d = doc.SelectSingleNode("/configuration"); XmlNode MYNODE = doc.CreateNode("element", "connectionStrings", ""); //newParent.(childNode); d.AppendChild(MYNODE); //Saving the document doc.Save("C:/Web.config"); MyOutput in my We...

SQL Server 2005 "FOR XML PATH" Multiple tags with same name

I have an XML structure like the following <root> <person> <name>James</name> <description xsi:type="me:age">12</description> <description xsi:type="me:height>6 foot</description> ... Which I have to pull out of a table like ... Person Name , Age , Height I'm trying to use the FOR XML path stuff in SQL 2...

How can I remove a namespace from an XML document?

In my Flex application, I call several .NET WebServices that return XML. However, these WebServices all return XML with a namespace. I cannot read/parse the XML without referencing the namespace, meaning that I have to include the following lines of code in each Class that calls a WebService: private namespace PCRWebServices = "xxx.some...

Exception when trying to deserialize a xml file

Im trying to deserialize an XML file with XmlSerializer, however im getting this exception: "There is an error in XML document (1, 2)" The innerexception is: "<Mymessage xmlns='http://MyMessages/'&gt; was not expected." Which is the very first line in the XML file. my guess is that it has something to do with the xmlns. I...

string replacement

I have leftmenu.xml for displaying a Telerik menu, and I need to convert Text from XML which is displayed as a leftmenu into resources. This is the XML: <?xml version="1.0" encoding="utf-8" ?> <PanelItems> <PanelItem Text="sample" NavigateUrl="../Default.aspx?id=menu" /> <PanelItem Text="sample2" NavigateUrl="../Default.aspx? ...

XSLT transformation problem with dynamic attribute

This is something that work: $curRow[1]/@gridClose but let say that I do not know the attribute name "gridclose". I will loop and get this attribute with the code. With the debugger I can get the value "gridClose" with : $curCol/@id. So I am trying to get something like : $curRow[1]/@{$curCol/@id} But it doesn't work. Any idea ho...

XML Reader on SQL Table returning invalid XML

I have SQL table that has a varchar(8) column that occasionally has binary data in it. (0x01, 0x02, etc...). (Changing the format or the content of the column isn't an option.) When I go into the SQL Server 2005 Management Studio and run the query: select * from mytable where clientID = 431620 for xml auto I get useful results...

How to match a list item using XQuery <intValues>1 2 3</intValues>

I am trying to match against ids stored as list element using XQuery. For example, <data> <item> <name>foo</name> <intValues>1 2 3 4 5</intValues> </item> <item> <name>bar</name> <intValues>6 7 8 9 10</intValues> </item> </data> is it possible to return items that include 3 in the intValues? ...

What is the best way to parse (big) XML in C# Code?

I'm writing a GIS client tool in C# to retrieve "features" in a GML-based XML schema (sample below) from a server. Extracts are limited to 100,000 features. I guestimate that the largest extract.xml might get up around 150 megabytes, so obviously DOM parsers are out I've been trying to decide between XmlSerializer and XSD.EXE generated ...

RSS Browser Detection

OK, I don't understand this at all. This is the BBC's RSS feed ( http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml) If you view it in ie6 it appears to be styled with a custom stylesheet (nosol.xsl) If you view it in firefox or ie7 the browser's default rss feed styling is used. I tried to do something similar my...

Memory management while loading huge XML files

We have an application which imports objects from an XML. The XML is around 15 GB. The application invariably starts running out of memory. We tried to free memory in between operations but this has lead to degrading performance. i.e it takes more time to complete the import operation. The CPU utilization reaches 100% The application is...

What is Oracle Native web services?

Native web services is a new feature of the XML DB technology. In google i found that it`s very close to SOA. Can anyone simply explain: 1) what is the main usage of Native web services 2) what is the main difference of XML DB 11g and previous XML DB releases. Thanks. ...

Add prefix to XML Root Node - Implementation of Scott Hanselman's suggestion?

I would like to add a namespace prefix to the XML root node and I found an entry by Scott Hanselman which details exactly what I would like to achieve. The only problem being the implementation is missing ! Modifying the namespace PREFIX of the root node of the body of a SOAP Web Services Response....whew! It would be of great help i...

Is MXML valid XML?

I am just curious, in MXML many tags are capitalized(eg: < Label /> ). I know this is because the node name is in relation to the class name the node represents and by convention classes are capitalized. But one of the rules of XML is that all node names be lowercase. So does this mean MXML is invalid XML? ...

Create and Save XML file to Server Using PHP

Hello, I'm using PHP to extract data from a MySQL database. I am able to build an XML file using DOM functions. Then using echo $dom->saveXML(); , I am able to return the XML from an AJAX call. Instead of using AJAX to get the XML, how would I save the XML file to a spot on the server? Thanks ...