xml

Parsing a URL from XML with & in it

I am trying to parse a URL with an & in the URL: ViewArticle.dbml?DB_OEM_ID=1800&ATCLID=3664162 ..but using NSXMLParser, all i get is 1800ATCL. It completely ignores the &. - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName att...

Open XML SDK 2.0 - how to update a cell in a spreadsheet?

I want to update a cell in a spreadsheet that is used by a chart, using the Open XML SDK 2.0 (CTP). All the code samples I have found insert new cells. I am struggling with retrieving the right worksheet. public static void InsertText(string docName, string text, uint rowIndex, string columnName) { // Open the document for editing....

What is the fastest way to programatically check the well-formedness of XML files in C#?

I have large batches of XHTML files that are manually updated. During the review phase of the updates i would like to programmatically check the well-formedness of the files. I am currently using a XmlReader, but the time required on an average CPU is much longer than i expected. The XHTML files range in size from 4KB to 40KB and verify...

How to create a calendar using XML

How to create a calendar using XML ...

DataContractSerializer: preserve references

Hi, Just a question of curiosity. When i preserve object refernces while serializing an object graph with DataContractSerializer the xml emitted where there are refrences looks like this: <test z:Ref="1" and i:nil="true" /> Can anybody tell me why it says i:nil="true" here? Why not just the reference? ...

Convert configuration files to XML

We have a large number of legacy configuration files, of various formats normally something like KEYWORD DATA KEYWORD DATA KEYWORD DATA. The the format of the data itself is unique within each configuration file. What we would like to do is define the file data formats in some way and then use that to allow a application to check a the...

C# Xml-Serializing a derived class using IXmlSerializable

I've got a base class which is compatible with XML serialization and a derived class which implements IXmlSerializable. In this example, the base class does implement IXmlSerializable: using System.Diagnostics; using System.Text; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; namespace XmlSerializationDeri...

how to save the generated xml file using jsp?

hi i have generated xml file using jsp,but i want the generated xml file should be saved as a file. my code is <?xml version="1.0" encoding="UTF-8"?> <%@ page contentType="text/xml;charset=ISO-8859-1" %> <playlist version="1" xmlns = "http://xspf.org/ns/0/"&gt; <title>My Band Rocks Your Socks</title> <trackList> <%! S...

Creating an XML document using namespaces in Java

I am looking for example Java code that can construct an XML document that uses namespaces. I cannot seem to find anything using my normal favourite tool so was hoping someone may be able to help me out. ...

Simple way to do Xml in Java

Is there is Simple way to read and write Xml in Java? I've used a SAX parser before but I remember it being unintuitive, I've looked at a couple of tutorials for JAXB and it just looks complicated. I don't know if I've been spoilt by C#'s XmlDocument class, but All I want to do is create an Xml Document that represents a a set of class...

Setting xml namespaces with the System.Xml.Linq api

Im having trouble generating XML along the lines of this: <Root xmlns:brk="http://somewhere"&gt; <child1> <brk:node1>123456</brk:node1> <brk:node2>500000000</brk:node2> </child1> </Root> This code get me most of the way but I cant get the 'brk' namespace infront of the nodes; var rootNode = new XElement("Root"); rootNode....

Open-source java XSLT 2.0 implementation?

I'm currently looking into using XSLT 2.0, but I cannot find any open-source java implementations (Saxon-B seems to fit the bill, but isn't schema-aware). Am I missing something? ...

What's the property way to transform with XSL without HTML encoding my final output?

So, I am working with .NET. I have an XSL file, XslTransform object in C# that reads in the XSL file and transforms a piece of XML data (manufactured in-house) into HTML. I notice that my final output has < and > automatically encoded into &lt; and &gt;. Is there any ways I can prevent that from happening? Sometimes I need to bold or i...

Is there a easy way to suppress the XML row tags of a collection in Oracle?

I have a query that I am generating the XML from in Oracle using the DBMS_XMLGEN package. As an example, I am using a cursor as follows: SELECT A.NAME primaryName, (CURSOR(SELECT B.NAME AS NAME FROM B WHERE B.ID=A.ID)) SYNONYMS FROM A I have a query context, qtx, and set the query to the above for that context. Calling: res...

Visual Xml to .net object mapper

Hi guys: I have to export my data, practically the entire domain model structure into a formal xml file. Does anyone know a visual tool that I can use to map an xml schema to my .NET object model? ...

XPath - Find elements by attribute namespace

I'm trying to use XPath to find all elements that have an element in a given namespace. For example, in the following document I want to find the foo:bar and doodah elements <?xml version="1.0" encoding="UTF-8"?> <root xmlns:foo="http://foo.example.com"&gt; <foo:bar quux="value">Content</foo:bar> <widget>Content</widget> <doodah ...

Fastest XML parser for small, simple documents in Java

I have to objectify very simple and small XML documents (less than 1k, and it's almost SGML: no namespaces, plain UTF-8, you name it...), read from a stream, in Java. I am using JAXP to process the data from my stream into a Document object. I have tried Xerces, it's way too big and slow... I am using Dom4j, but I am still spending way ...

How to create a xml file at a particular location from the output generated from jsp page.

sports.jsp: <?xml version="1.0" encoding="UTF-8"?> <%@ page contentType="text/xml;charset=ISO-8859-1" %> <% response.setHeader("Content-Disposition", "attachment; filename=\"playlist.xml\""); %> <playlist version="1" xmlns = "http://xspf.org/ns/0/"&gt; <title>My Band Rocks Your Socks</title> <trackList> <%! String[] sports; %>...

How to size Android components according to image size using XML

Hi I have created a custom icon bar in Android using the XML layout creator, using a RadioGroup within a LinearLayout (XML included below). Each RadioButton within the RadioGroup has a custom drawable (with checked and unchecked states) as its android:button attribute. The Linear layout is itself within a RelativeLayout so that it c...

how to pass parameters from html page to batch file

Hi, I have the following requirement. I need to pass parameters from html page to batch file which in turn passes the paramter to xml file.I need to know how to pass parameters from html to batch file and from batch file to xml file Thanks ...