xml

Using XPATH to search text containing  

I use XPather Browser to check my XPATH expressions on an HTML page. My end goal is to use these expressions in Selenium for the testing of my user interfaces. I got an HTML file with a content similar to this: <tr> <td>abc</td> <td>&nbsp;</td> </tr> I want to select a node with a text containing the string "&nbsp;". With a no...

Boolean logic rule evaluator

I have essentially a survey that is shown, and people answer questions a lot like a test, and there are different paths, it is pretty easy so far, but i wanted to make it more dynamic, so that i can have a generic rule that is for the test with all the paths, to make the evaluator easier to work with currently i just allow AND's, and ea...

Sending large files via HTTP

I have a PHP client that requests an XML file over HTTP (i.e. loads an XML file via URL). As of now, the XML file is only several KB in size. A problem I can foresee is that the XML becomes several MBs or Gbs in size. I know that this is a huge question and that there are probably a myriad of solutions, but What ideas do you have to t...

Tool to find duplicate sections in a text (XML) file?

Hiya, I have an XML file, and I want to find nodes that have duplicate CDATA. Are there any tools that exist that can help me do this? I'd be fine with a tool that does this generally for text documents. ...

Ruby support for XML namespaces

Hello, I work at a small company and our production system uses a hand-rolled RESTful API, implemented in Java with JAXB. We now find that we're taking on customers who use Ruby on Rails, and I have to come up with a reference implementation to show customers how to use our API in Ruby. I'd love to be able to just tell them to use Acti...

JQuery: how to add XML node?

Assume parentNode exists and I want to add an element "Child" to it. Following intutive code won't work: $("<Child/>").appendTo(parentNode); Because jQuery will create a node <CHILD> and append to parentNode. So I am wondering, how do you add xml child node in jQuery? p.s. Following ugly code will work, but it is really really ugly:...

jQuery: how to get xml system independently?

Suppose xmlNode is a XML DOM node, how do you get its xml system independently? For IE, it is xmlNode.xml; For netscape, it is new XMLSerializer().serializeToString(xmlNode). In jQuery, is there any built-in method I can leverage? ...

Guidelines for formatting XML Namespace

I have not developed web services applications that publicly faced the Internet. As I begin to consider the issues of exposing schema definitions to a wide audience, I believe a certain amount of consideration should be spent on properly formatting the schema namespaces. Has anybody come across a guideline document that advises how to g...

split xml document into chunks

I have a large xml document that needs to be processed 100 records at a time It is being done within a Windows Service written in c#. The structure is as follows : <docket xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="docket.xsd"> <order> <Date>2008-10-13</Date> <orderNumber>050758...

How to get my Web Service response XML to validate in Liquid XML Studio?

Hello. A simple question on how to get the response from a Web Service that can be validated using Liquid XML Studio. Web Service code (ASP.NET 2.0): [WebMethod] [return: XmlElement("TestMe")] public string TestMe(int value) { return value.ToString(); } The will result in this response: <?xml version="1.0" encoding="utf-8"?> <soa...

How to copy a structure of nodes from one xml to an other with a different namespace?

I have two XML files with two different XSD schemas and different namespaces. They have both an identical substructure. And now i need to copy that node (and all childs) from one XML document to the other one. Clone would do, if the namespaces were the same. Is there a nice way to do it? (The substructure will change later on - but wi...

Passing-through unknown XML elements in a SAX parser

I am loading some data from an XML document, modifying it, and writing back out to XML. The reading is done using a SAX parser library and the writing is done with a piece of custom code. Sometimes, the file is modified externally, and extra elements are added (such as references to stylesheets). Rather than losing these extra element...

right approach to handling bad xml data

I've got a little c# windows service that periodically pulls xml from a web service and stores the data in a database table. Unfortunately it's failing because the web service has occasional bad data in it - strings instead of decimals. I don't have any control over the web service (unvalidated user input from software we can't change)...

How to create XML/XSD equivalent of a DataSet or DataTable in VS2008 (or other tool)

So today I had to move some tables with data from an MS Access database into XML to be used in a web application. So I thought it would be an easy process to define the table structure as an XSD file in Visual Studio, then load in the data (for the sake of simplicity, lets say I would type it in). Well for the life of me I can't figure...

How can I access BadgerFish notated attributes using javascript?

I have created a json object from ruby with cobravsmongoose, however the attributes have the '@' symbol in front of them. Whenever I try to access them with standard object notation in JavaScript, such as object.object.object.@attribute I get a parse error. Is there another way to access these objects? ...

Best way to get a comma delineated string into xml format?

Using VB.net (.net 2.0) I have a string in this format: record1_field1,record1_field2,record2_field3,record2_field1,record2_field2, etc... I wonder what the best (easiest) way is to get this into an xml? I can think of 2 ways: Method 1: - use split to get the items in an array - loop through array and build an xml string using conc...

MS SQL 2005 Table to XML

I have a simple table in SQL Server 2005, I wish to convert this to XML (using the "FOR XML" clause). I'm having trouble getting my XML to look like the required output. I've tried looking through various tutorials on the web, but I am struggling. Can someone help? The table I have looks like this TYPE,GROUP,VALUE Books,Hardback,56 Bo...

Defining Web Services - What is the requirement to make namespace definitions accessible?

Hello, I am sitting down to define my first web service and have what is probably a basic question about the accessibility requirements of namespace definitions? When a consumer of these web services identifies message elements as belonging to my namespace, must the URI reference for this namespace be available at the time the messag...

What is the correct format to use for Date/Time in an XML file (.NET)

What format do I use for Date/Time when writing to an XML file using .NET? Do I simply use DateTime.ToString(), or do I have to use a specific format? ...

XmlSerializer Serialize empty variable to use both tags?

I want to be able to load a serialized xml class to a Soap Envelope. I am starting so I am not filling the innards so it appears like: <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" /> I want it to appear like: <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" ></Envelope>` The class I wrote is t...