xml

Is there a quick way to format an XmlDocument for display in C#?

I want to output my InnerXml property for display in a web page. I would like to see indentation of the various tags. Is there an easy way to do this? ...

Import XML to SQL using C#

I know its kind non sportiness asking for this kind of help, But I am relay stacked on this for while, Temporally I am reading two C# books and working everyday over 9 hours. Okay here is my problem I have WIN C# application that I almost done. In SQL i got a three tables look like this: CREATE TABLE [dbo].[Racuni]( [BROJ] [varchar](1...

Getting XML Node text value with Java DOM

I can't fetch text value with Node.getNodeValue(), Node.getFirstChild().getNodeValue() or with Node.getTextContent(). My XML is like <add job="351"> <tag>foobar</tag> <tag>foobar2</tag> </add> And i'm trying to get tag value (non-text element fetching works fine). My Java code sounds like Document doc = db.parse(new File(a...

Bean merging in java

Hi, I have got a Jibx bean which is used as both input and output to a webservice. The bean is very large and complex with deep parent child relationship. The webservice does not return the request object but returns a new bean with some properties populated. I would like to merge my request and the response. I tried using Dozer (it just...

XML Parsing in Cocoa Touch/iPhone

Okay i have seen TouchXML, parseXML, NSXMLDocument, NSXMLParser but i am really confused with what to to do. I have an iphone app which connects to a servers, requests data and gets XML response. Sample xml response to different set of queries is give at http://pastebin.com/f681c4b04 I have another classes which acts as Controller (As ...

XSLT to denormalize/pivot/flatten xml file? Part 2

(Note: I have posted a variation on my earlier question as suggested) Given an input xml file with following structure: <widgets> <widget shape="square" material="wood" color="red" /> <widget shape="square" material="metal" color="blue" /> <widget shape="square" material="plastic" color="green" /> <widget shape="squar...

What is the correct way to represent null XML elements?

I have seen null elements represented in several ways: The element is present with xsi:nil="true": <book> <title>Beowulf</title> <author xsi:nil="true"/> </book> The element is present, but represented as an empty element (which I believe is wrong since 'empty' and null are semantically different): <book> <title>Beowu...

FileStream.truncate() doesn't work after calling FileStream.readUTFBytes() (Adobe AIR)

I'm trying to read an xml file into memory, add a node, then write over the original file. The following code works just fine (it clears the file, then writes the new bytes over the top): var stream:FileStream = new FileStream(); stream.open(file, FileMode.UPDATE); stream.position = 0; stream.truncate(); stream.writeUTFBytes("<?xml ver...

Is there an API in .net to read XML comment documentation file.

In this question I see that microsoft ships the XML documentation files for the BCL. I wonder if anyone knows if there an API within .net that can be used to look this up at runtime. I know we can parse the files manually using the XML api. The use case is that we allow custom (read 3rd party) types/assemblies to be used in our system, ...

C# - How to read a continuous stream of XML over HTTP

I am trying to figure out the best way to consume a continuous stream of XML data from a service that is sending the data as a "constant" feed over HTTP. I was considering using HttpWebRequest/Response but I am not sure how that will behave if the data just continuously streams. Any thoughts? ...

How can I change the name of an element in DOM?

Hello, In PHP with DOM, I have a DomElement object which represents an <identity/> element. I have one case where I need to change this so its element name is <person/>, but keep the same child elements and attributes. What would be the simplest way of changing an element name of a DomElement and keeping its children and attributes? ...

Is there a way of auto-generating elements.xml etc files for sharepoint development?

I have matched the "12 hive" structure in my solution, and I am using SPDeploy to create and deploy .wsp files and to deploy to my test servers. I am about to add a whole bunch of files throughout the structure and there is quite a lot of redundancy in the elements.xml and feature.xml files. Has anyone done the work to assist in the cre...

How to generate xs:Date in WCF OperationContract parameter

For parameters to an OperationContract that represent a date only (no time component or timezone designator), it is desirable to use xs:Date, to avoid any ambiguity or problems with timezone conversion between client and server. WCF currently only supports xs:DateTime for serializing DateTime parameters. What is the easiest way to gene...

Incremental interchange format

I need a format to transfer data from program A to program B, and obviously I'd prefer to use a standard format. On the face of it XML would be perfect for this job, or possibly JSON. The fly in the ointment is that I need the format to be incremental: program A appends data to the file from time to time, then program B slurps the whole...

fastest way to store comment data python

Hi I have a small comment shoutbox type cgi process running on a server and currently when someone leaves a comment I simply format that comment into html i.e <p class="title">$title</p> <p class="comment">$comment</p> and store in a flat file. Would it be faster and acceptably low in LOC to reimplement the storage in xml or json, in a...

flex xml appendchild

Hi, In my flex project I am using XML to populate TextFlow using: TextFilter.importToFlow(XML(str), TextFilter.PLAIN_TEXT_FORMAT); I woud like to add html links to the textflow. For that I adding html a tag in xml but I am getting parser error(malformed xml). var fixed:String; fixed = fixed.replace(link, "<a href='event:xyz' >"+link...

How to add namespace to an xml file using java program

I want to add namespace to an xml file using java program. So how can I add namespace to an xml file using java Thanks Bapi ...

Wrapping Arbitrary XML within XML

I need to embed arbitrary (syntactically valid) XML documents within a wrapper XML document. The embedded documents are to be regarded as mere text, they do not need to be parseable when parsing the wrapper document. I know about the "CDATA trick", but I can't use that if the inner XML document itself contains a CDATA segment, and I nee...

When do you use XPath over XmlDocument or XmlTextReader?

When do you use XPath over XmlDocument? I'm trying to see things from a higher level. Is there a situation where it is better to use XPath over XmlDocument? ...

Is there a way to have browsers ignore or override xml-stylesheet processing instructions?

I'm trying to write a bookmarklet to help some QA testers submit useful debugging information when they come across issues. Currently I can set window.location to a URL that provides this debugging information, but this resource is an XML document with an xml-stylesheet processing directive. It would actually be more convenient if the t...