xml

Parsing very large XML documents (and a bit more) in java

(All of the following is to be written in Java) I have to build an application that will take as input XML documents that are, potentially, very large. The document is encrypted -- not with XMLsec, but with my client's preexisting encryption algorithm -- will be processed in three phases: First, the stream will be decrypted according ...

linq to xml: how to select the value from elements

Hi all, I need return a list of the element <AssetText>. My query below only returns back the first AssetText. Any thoughts much appreciated. var q = from c in xDoc.Descendants("Product") where (int) c.Element("ProductView").Element("ViewId") == 44 select (string) c.Element("ProductView").Element("AssetText").Element("T...

simple music or tunes via HTML?

I'm looking for a simple way to put up musical "tunes" on a website. So here's an analogy to explain my question: Let's say I want to put up a couple of big triangles as a picture on my web page. I can either draw a bitmap and save as GIF/JPG/PNG, put it up somewhere on the internet, and link to it with an element. That works but the ...

Can you copy property or constructor-arg valuse from objects in Spring.NET XML?

I believe I came across this a couple months ago, but now I'm having trouble finding the answer. Perhaps someone can just point me to the right section in the documentation? Using Sprint.NET, I'm combining remote XML files into a single application context where the engine objects are separate from the business rule objects. The probl...

Is there a pattern for using XML for no-overhead object serialization?

In the same way that you can use JSON in javascript? At least the static properties? Or maybe even for hash-table streaming? Is it oversimplistic about hoping to find something like Object.Serialize(stream) where stream is a file, overrideable with your choice of other likely candidate targets, using some default format, say XML? W...

Java change and move non-standard XML file

I am using a third party application and would like to change one of its files. The file is stored in XML but with an invalid doctype. When I try to read use a it errors out becuase the doctype contains "file:///ReportWiz.dtd" (as shown, with quotes) and I get an exception for cannot find file. Is there a way to tell the docbuilder to i...

I think this is some kind of encoding problem...

I have two computers. Both running WinXP SP2 (I don't really know ho similar they are beyond that). I am running MS Visual C# 2008 express edition on both and that's what I'm currently using to program. I made an application that loads in an XML file and displays the contents in a DataGridView. The first line of my xml file is: <?xm...

How would I dynamically add a new XML node based on the values of other nodes?

Background: I have an old web CMS that stored content in XML files, one XML file per page. I am in the process of importing content from that CMS into a new one, and I know I'm going to need to massage the existing XML in order for the import process to work properly. Existing XML: <page> <audience1>true</audience> <audience2>f...

Can't Rebind FormView Control on Postback

Greetings! I have a DropDownList within a FormView which are bound to XmlDataSources: <asp:FormView ID="MyFormView" runat="server" DataSourceID="MyXmlDataSource"> <ItemTemplate> <h1><%# XPath("SomeNode")%></h1> <asp:Label ID="MyLabel" runat="server" AssociatedControlID="MyDdl" Text='<%# XPath("SomeOtherNode")%>' /> ...

Unwanted xmlns="" in _di_IXMLNode

I'm creating a xml-file for display in Excel using _di_IXMLDocument. But for some tags I get an unwanted extra (empty) xmlns attribute witch makes the file unreadable for Excel... This is what i do: ... _di_IXMLNode worksheet = workbook->AddChild("Worksheet"); worksheet->SetAttribute("ss:Name",Now().DateString()); ... and this is what...

Add attribute to an xml node with nant

Hi, Is there a way to add an attribute to an xml node (which I have the xpath of) using nant? Tried xmlpoke but it looks like it can only update existing attributes. thanks. ...

How to retrieve Build Status in XML from TeamCity

Hi there, I need to retrieve the Build Status from TeamCity in the form of XML, RSS format would be ideal. I am familiar with the RSS feed within Teamcity but that is of no use as it is more of a history view. I am looking for something more like the page generated by the Status Widget but in XML form. (FYI, the status widget page is n...

Specifying attribute values as CDATA

Can one specify XML attribute values as CDATA ? If yes - what would be the schema for the same. If not - why is this limitation not addressed in XML ? ...

How to configure JAXB so it trims whitespaces when unmarshalling tag value?

How to configure JAXB unmarshaller so it will trim leading and trailing whitespaces from strings? For instance let's consider a simple binding between a Java bean and XML using JAXB annotations: @XmlRootElement(name="bean") class Bean { @XmlElement(required=true) String name; @XmlElement(required=true) int number; } I woul...

XML Schema Case Insensitive Enumeration of Simple Type String

I am in need of a case insensitive string enumeration type in my XML schema (.xsd) file. I can get case insensitive by doing the following. <xs:simpleType name="setDigitalPointType"> <xs:restriction base="xs:string"> <xs:pattern value="[Oo][Nn]" /> <xs:pattern value="[Oo][Ff][Ff]" /> </xs:restriction> </xs:simpleType> The only p...

How can I get the value data out of an MSXML::IXMLDOMElement

I have an xml string <grandparent> <parent> <child>dave</child> <child>laurie</child> <child>gabrielle</child> </parent> </grandparrent> What I want to get is the data raw xml that's inside the parent. I'm using MSXML iXMLElm->get_xml(&bStr); is returning <parent> <child>dave</child> <child>laur...

Java REST client without schema

Goal Java client for Yahoo's HotJobs Resumé Search REST API. Background I'm used to writing web-service clients for SOAP APIs, where wsimport generates proxy stubs and you're off and running. But this is a REST API, which is new to me. Details REST API No WADL No formal XML schema (XSD or DTD files). There are example XML request/...

Saving Program Data

I'm looking for some information and a little history. I am writing a program and I want to save some data without using a database. I'm assuming I could use XML but what else can I use? How do you save data to files and then retrieve them without XML and without plain text? What is Binary formatting, can that be used? Isn't binary forma...

Read XML Node

hi, I want to read an specific xml node and it's value for example <customers> <name>John</name> <lastname>fetcher</lastname> </customer> and my code behind should be some thing like this ( I don't know how it should be tho :)) Response.Write(xml.Node["name"].Value) blah blah. As I said It's just an example cuz I don't know how t...

Output library project XML to asp.net bin folder on build?

I have a visual studio 2005 solution which has a web application and a class library project. The web application has a reference to the library project. I'd like the library project's code documentation XML to output to the web application's bin folder, along with the library's DLL. I can't seem to find any easy way of doing this. ...