xml

What's a good way to serialize Delphi object tree to XML--using RTTI and not custom code?

What's a good way to serialize a Delphi object tree to XML--using RTTI and not custom code? I would have loved to find that this feature is already built into Delphi, but it doesn't seem to be. I've found a few components (posted, below) that seem like they might perform this function. Have you used any of them or some other offering?...

receiving xml from another website's call to ServerXMLHTTP post in classic asp

I am writing both sides of an asp-webpage to asp-webpage conversation in which the originating webpage pushs information to the receiving webpage which then processes it and sends back a response. The originating webpage must use the code below to start the converstation... url = "www.receivingwebsite.com\asp\receivingwebpage.asp" info...

What is the best way to serialize a ModelForm object in Django?

I am using Django and the Google Web Toolkit (GWT) for my current project. I would like to pass a ModelForm instance to GWT via an Http response so that I can "chop" it up and render it as I please. My goal is to keep the form in sync with changes to my models.py file, yet increase control I have over the look of the form. However, the d...

Looking for XML parser

I have been tasked with finding an open source DOM XML parser. The parser must minimally support XPath 1.0. Schema support is desired, but not a deal breaker The files we are parsing will be small so speed and memory consumption are not a large concern. Any OO language (C++, C#, Java, etc.). To clarify, the plan is to integrate ...

java append to file

I googled for this for a while but can't seem to find it and it should be easy. I want to append a CR to then end of an XML file that I am creating with a Transformer. Is there a way to do this> I tried the following but this resulted in a blank file? Transformer xformer = TransformerFactory.newInstance().newTransformer(); xformer.set...

How to deserialize only part of an XML document in C#

Hi everyone, Here's a fictitious example of the problem I'm trying to solve. If I'm working in C#, and have XML like this: <?xml version="1.0" encoding="utf-8"?> <Cars> <Car> <StockNumber>1020</StockNumber> <Make>Nissan</Make> <Model>Sentra</Model> </Car> <Car> <StockNumber>1010</StockNumber> <Make>Toyota</Ma...

How do I pass a dynamic url from xml into an onClick Mouse Event in ActionScript 3?

Im loading the xml in, and Im able to read the xml nodes into text fields in my flash. It is also loading the url, but the last one from the loop. Its not loading the one that I click on. I tried using event.target, but that is not working. Im pretty close to figuring it out, Im just not sure where to look. Any help would be greatly appr...

Serializing without XmlInclude

Howdie! So I'm deserializing a class called Method using .NET Serialization. Method contains a list of objects implementing IAction. I originally used the [XmlInclude] attribute to specify all classes which implement IAction. But now, I'd like to change my program to load all dlls in a directory and strip out the classes which impleme...

Mark Of The Web and XML+XSL

Is it possible to use Mark of the Web in XML file which is parsed by a local XSL file? When I insert MOTW mark: <!-- saved from url=(0014)about:internet --> i get following message: Access is Denied. Error Processing Resource. Ok, I see that I was trying to do it wrong - I wanted to insert this comment into XML. I have three file...

How to tell Java which StringEscapeUtils.escapeXML() to use???

I'm trying to use the StringEscapeUtils.escapeXML() function from org.apache.commons.lang... There are two versions of that function, one which expects (Writer, String) and one which just expects (String).... http://commons.apache.org/lang/api/org/apache/commons/lang/StringEscapeUtils.html#escapeXml(java.lang.String) I'm trying to use...

Traversing an arbitrary C# object graph using XPath/applying XSL transforms

I've been looking for a component that would allow me to pass an arbitrary C# object to an XSL transform. The naive way of doing this is to serialise the object graph using an XmlSerializer; however, if you have a large object graph, this could cause problems as far as performance is concerned. Issues such as circular references, lazy l...

.Net XmlWriter - unexpected encoding is confusing me

Environment is VS2008, .Net 3.5 The following C# code (note the specified encoding of UTF8) XmlWriterSettings settings = new XmlWriterSettings (); StringBuilder sb = new StringBuilder(); settings.Encoding = System.Text.Encoding.UTF8; settings.Indent = false; settings.NewLineChars = "\n"; settings.ConformanceLevel = System.Xml.Confo...

Game Logic in XML Files

I'm dealing with game dialogue files (conversation between player and non-playable-characters) where dialogue choices and their outcome depend on certain conditions and result in certain actions. Now, I could write a simple parser to handle some sort of language for specifying the pre and post-conditions, but a friend of mine suggested u...

ASP.NET InnerXml automatically/incorrectly appending attribute text to tags

So I have some XML in the following format: <somenode> <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title/> </head> <body> <p>P one</p> <p>Another p</p> </body> </html> </somenode> Nestled in there is some html, which I didn't think would be an issue...

Best XML parser for Java

I need to read smallish (few MB at the most, UTF-8 encoded) XML files, rummage around looking at various elements and attributes, perhaps modify a few and write the XML back out again to disk (preferably with nice, indented formatting). What would be the best XML parser for my needs? There are lots to choose from. Some I'm aware of ar...

Regex detect linebreak inside a XML node

I'm having troubles with a regexp. I'm looking through a set of XML files, and trying to detect some text inside specific nodes that contain a line break. Here is some sample data: <item name='GenMsgText'><text>The signature will be discarded.</text></item> <item name='GenMsgText'><text>The signature will be discarded.<break/> Do you ...

How to return XML in ASP.NET

This is a very basic question. I'm just on my mission to learn ASP.NET (C#). I've done classic ASP and PHP before. For this project I have ASP.NET 2.0 at my hands. I have a Web Form that has a jqGrid Datagrid that I want to feed XML data via AJAX. jqGrid is not the problem here, though. The "problem" is the approach that I should take ...

What is a good way to find a specific value in an XML document using C#?

I'm calling a WebService exposed by Oracle that accepts an input of an ItemID and returns to me the corresponding Item Number. I want to grab the Item Number that has been returned out of the XML contained in the response. The XML looks like this: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http:/...

How does one test a file to see if it's a valid XML file before loading it with XDocument.Load()?

I'm loading an XML document in my C# application with the following: XDocument xd1 = new XDocument(); xd1 = XDocument.Load(myfile); but before that, I do test to make sure the file exists with: File.Exists(myfile); But... is there an (easy) way to test the file before the XDocument.Load() to make sure it's a valid XML file? In oth...

Find frequency of values in an Array or XML (C#)

I have an XML feed (which I don't control) and I am trying to figure out how to detect the volume of certain attribute values within the document. I am also parsing the XML and separating attributes into Arrays (for other functionality) Here is a sample of my XML <items> <item att1="ABC123" att2="uID" /> <item att1="ABC345" att2="uID...