xml

XDocument Get Part of XML File

Hello, I have a large xml file and want to get a defined number of <Cooperation> nodes from it. What's the best way to handle this. Currently, I'm using this code public string FullCooperationListChunkGet(int part, int chunksize) { StringBuilder output_xml = new StringBuilder(); IEnumerable<XElement> childList = from el in xml...

Why do XML Namespaces usually start with http://... ?

For example, the WPF namespace is: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" If I define my own namespace, should it also start with http? Isn't http misleading? ...

How to modify multiple nodes using SQL XQuery in MS SQL 2005

In an table I have the following. ParameterID (int) ParameterValue (XML) ------------ -------------- 1 <USER><User ID="1" Name="Billy"/><USER> <USER><User ID="2" Name="Billy"/><USER> <MANAGER><User ID="1" Name="Billy"/><MANAGER> 2 <USER><User ID="1" Name="John"/><USER> ...

How to create a stateful XML WebService in asp.net ?

Without getting into the 'Stateful services are bad' discussion... How do you create one? From the lack of helpful search results.. it seems either I'm searching for the wrong terms or it is being actively discouraged. The best link i could find was this one on MSDN To give a brief context of what my current app looks like. Rails Web A...

How can i get categories list of amazon shopping in xml ?

I want to get categories/departments list of amazon shopping in xml. ...

Reloading a configuration file under jBoss

Hello everyone. Inspired by how Log4j reload its configuration files everytime I change it, I wrote a similar mbean task that read my xml file put in server/(myconfig)/conf Now I need to access it from my web application, which is in the deploy folder packaged as a .war file (it's a SEAM application). Should I create a method in the ...

How to read the XSD datetime format in PHP ?

Is there a function, class, or extension in PHP that can handle the XSD datetime format? It's a standard XML date & time format, that looks like this: <date>2008-02-28T07:56:35.263</date> I know I can read it with a regular expression, if no solution is given, I'll default to that. Thanks! PS: Solved, look at the answers. ...

Populating an InfoPath control with SharePoint users

I am trying to use the UserGroup.asmx Sharepoint web service to populate a dropdown list in InfoPath 2007 (2003 compatible form). I followed the instructions here: http://tim.bellette.net/2008/12/13/getting-sharepoint-users-in-infopath-2003. I put the following code in the OnLoad event for the form, and if I set a breakpoint I can see ...

Loading xml from url without styling it in C#

I'm trying to load an xml from a url in C#, but the problem is that, there is an xsl attached to the xml file, which means that I don't get the content of the xml file, but the html that it's transformed to using the xsl. Is there any way to load the xml without first transforming it, so I just get the content of the xml? ...

Java: problem loading stylesheet

Problem: I'm trying to load a stylesheet in Java but I get an error stateing it isn't a stylesheet. The Error: ERROR: 'The input document is not a stylesheet (the XSL namespace is not declared in the root element).' FATAL ERROR: 'Could not compile stylesheet' Exception in thread "main" javax.xml.transform.TransformerConfigurationExc...

SimpleXMLElement Error: Multiple times!

Hello all, I have found these errors in my error log: [05-Aug-2009 12:57:27] PHP Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: ^ in /home/mojo/public_html/shackupload.php on line 37 The funny thing is I had about 200 of the above in my error log all with the same ...

Really simple command line SAX parser for XML files

I've used xmlstartlet to process XML files before. You can give it a simple comannd line and it will generate (internally) an XSLT template and apply that to an XML file. However now I have a large XML file, so I really need to use SAX for this, not XSLT. Rather than write a simple programme to do this, I'm wondering if there is a more ...

Cant get description rss tag data with javascript

I'm currently making a widget to take and display items from a feed. I have this working for the most part, but for some reason the data within the tag within the item comes back as empty, but I get the data in the and tags no problem. feed is and xmlhttp.responseXML object. var items = feed.getElementsByTagName("item"); for (var i...

Best strategy for reading XmlFormatter formated log files in Java?

Hi! I've got an xml log file formatted with XMLFormatter. I'd like to process this file for report purposes. My problem is, that the log file is not finished by tag, because it is still being written, which makes xml parser bail out. The log structure is following: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE log...

Decode CDATA section in C#

I have a bit of XML as follows: <section> <description> <![CDATA[ This is a "description" that I have formatted ]]> </description> </section> I'm accessing it using curXmlNode.SelectSingleNode("description").InnerText but the value returns \r\n This is a "description"\r\n that I have formatted instead...

Serialize Complex Type System.Nullable<System.DateTime>

I want to serialize DateTime so that when DateTime is null I dont get the tag itself. I have also set bool specified for the above but my problem is DateTime being of value type it will never be null hence the bool specified will always be true for it. I even tried replacing DateTime to System.Nullable but I get Serialization Error whe...

XML Serialization of List<T> - XML Root

First question on Stackoverflow (.Net 2.0): So I am trying to return an XML of a List with the following: public XmlDocument GetEntityXml() { StringWriter stringWriter = new StringWriter(); XmlDocument xmlDoc = new XmlDocument(); XmlTextWriter xmlWriter = new XmlTextWriter(stringWriter);...

Substring of XML datatype column value in SQL server 2005

I have a table in a database in SQL server 2005.one of the column is of XML datatype.the content of the columns is like <info>This is a sample information .Anyone can help </info> Now i want to query the data in the table with a part of the column value as response. ie : My desired output is "This is a sample " What should be the...

next line character a huge influence on xmlparser?

I have question about a basic xml file I'm parsing and just putting in simple nextlines(Enters). I'll try to explain my problem with this next example. I'm( still) building an xml tree and all it has to do ( this is a testtree ) is put the summary in an itemlist. I then export it to a plist so I can see if everything is done correctly....

Error :File cannot be accesssed as File Being accessed by another process.

Hi I am working on a project, in which I need to write xml to a file, this happens in a for loop, that is for(int i = 0; i < screens.length; screens++) { XMLDocument allScreens = new XMLDocument(); allScreens.Load(allScreeensPath); XMLNode node = allScreens.Select("//Screen[@name='" + screens[i].name + "']"); allScre...