In my environment here I use Java to serialize the result set to XML.
It happens basically like this:
//foreach column of each row
xmlHandler.startElement(uri, lname, "column", attributes);
String chars = rs.getString(i);
xmlHandler.characters(chars.toCharArray(), 0, chars.length());
xmlHandler.endElement(uri, lname, "column");
The XM...
This is a followup question of How to encode characters from Oracle to Xml?
In my environment here I use Java to serialize the result set to xml. I have no access to the output stream itself, only to a org.xml.sax.ContentHandler.
When I try to output characters in a CDATA Section:
It happens basically like this:
xmlHandler.startEleme...
I'm attempting to check for the existence of a node using the following .NET code:
xmlDocument.SelectSingleNode(String.Format("//ErrorTable/ProjectName/text()='{0}'", projectName));
This always raises XPathException: Expression must evaluate to a node-set. Why am I getting this error and how can I resolve it? Thank you.
...
When you're adding javaDoc comments to your code and you're outlining the structure of an XML document that you're passing back, what's the best way to represent attributes? Is there a best practice for this?
My general structure for my javaDoc comments is like this:
/**
* ...
*
* @return XML document in the form:
*
* <pre>
* &...
Following Izb's question about Best binary XML format for JavaME, I'm looking for an implementation for either binary XML-like formats or just plain XML. My metrics for such implementation, by most important first, are:
Supported phones. A basic JTWI phone should be able to run it.
It should be either verified or open source, so I cou...
I've got a XmlNodeList which I need to have it in a format that I can then re-use it within a XSLT stylesheet by calling it from a C# extension method, can anyone help? I have read that it might have something to do with using a XPathNavigator but I'm still a bit stuck.
Thanks in advanced,
Chris
...
I was looking for a generic method in .Net to encode a string for use in an Xml element or attribute, and was surprised when I didn't immediately find one. So, before I go too much further, could I just be missing the built-in function?
Assuming for a moment that it really doesn't exist, I'm putting together my own generic EncodeForX...
Is there any way to output the contents of an XDocument without the BOM? When reading the output with Flash, it causes errors.
...
Using .Net 3.0 and VS2005.
The objects in question are consumed from a WCF service then serialized back into XML for a legacy API. So rather than serializing the TestObject, it was serializing .TestObject which was missing the [XmlRoot] attribute; however, all the [Xml*] attributes for the child elements were in the generated proxy cod...
I mean 100+ MB big; such text files can push the envelope of editors.
I need to look through a large XML file, but cannot if the editor is buggy.
Any suggestions?
...
Hi,
I am working on an ASP site hosted using SUN One (used to be called Chillisoft) server. I am having trouble loading in an XML file, the code I am using is below
dim directory
set directory = Server.CreateObject("MSXML2.DOMDocument")
if(directory.load(Server.MapPath("directory.xml"))) then
Response.Write("Loaded")
else
Re...
I'm using org.w3c XML API to open an existing XML file. I'm removing some nodes , and I'm adding others instead . The problem is that the new nodes that are added are written one after another , with no newline and no indentation what so ever. While it's true that the XML file is valid , it is very hard for a human to examnine it.
Is the...
I need to control the data type when reading XML data in SAS. The XML data are written and accessed using the XML libname engine in SAS.
SAS seems to guess the data type based on the contents of a column: If I write "20081002" to my XML data in a character column, it will be read back in as a numerical variable.
An example:
filename m...
I have a process that reads an XML file. It uses the XMLTextReader class to do this as it is supposed to be a fast, forward only XML parser/reader.
Works just great with a 1 megabyte test file but comes to a complete halt when working on a 12 meg file in the live system.
Are there any solutions to this other than writing my own XML rea...
I've got an XML document containing news stories, and the body element of a news story contains p tags amongst the plain text. When I use XSL to retrieve the body, e.g.
<xsl:value-of select="body" />
the p tags seem to get stripped out. I'm using Visual Studio 2005's implementation of XSL.
Does anyone have any ideas how to avoid this...
I have a lot of XML files and I'd like to generate a report from them. The report should provide information such as:
root 100%
a*1 90%
b*1 80%
c*5 40%
meaning that all documents have a root element, 90% have one a element in the root, 80% have one b element in the root, 40% have 5 c elements in b.
If for example some documents h...
I'm writing out XML files using the MSXML parser, with a wrapper I downloaded from here: http://www.codeproject.com/KB/XML/JW_CXml.aspx. Works great except that when I create a new document from code (so not load from file and modify), the result is all in one big line. I'd like elements to be indented nicely so that I can read it easily...
How can I redistribute crystal report with an xml dataset in a windows application. I want to be able to use the same xsd and a new xml file every time. When I load the RPT file from inside my application using the code below on a computer other than my own it looks for the xml and xsd. Is there any way I can strip this information from ...
If I need to implement sending and receiving of business documents from system to system (invoices, POs, remittance advice, etc) what standard would you recommend for best interop and why? It could be XML or otherwise.
...
Hi,
I have a xml blob that's checked against a schema in sql 2005. My website uses xsl to transform and display the blob. How do I add a hyperlink to the xml (in any node) without the sql 2005 schema complaining a node was found in the wrong place? Or the xsl thinking that the hyperlink is a valid xml node?
thank you
...