I have the following xml file:
<contract>
<ID>4</ID>
<name>Name of contract</name>
<commoditycode>CS,CP</commoditycode>
</contract>
I want to have the comma separated values in "commoditycode" in a dropdown list like this:
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Text="CS" Value="CS" />
<...
I have a large web form application that I want to allow the user to export their data in case they don't want to complete the entire form at once. Then when they return they can import the data and continue where they left off.
The reason for this is part of the requirement for the client is that no database is to be used.
I've gotten...
I am working in a framework (cocoon) which means that the pages after I produce them are re-transformed by processes I have little or no control of. What I am doing is making a web service call, then transforming the results into an HTML page for presentation. Sounds like a job for XSLT. Everything works fine, until the data returned ...
See question. Also any links to example code or example code on how to validate an xml file against multiple schemas would be helpful.
EDT: Sorry forgot to mention that this is for LINUX
...
I have some code that generates XML from some tables. The tables that I'm querying were generated from an XSD file the describes the XML I am supposed to be generating. The problem is that the names of the tables and fields follow a different naming convention than those in the schema - for example, an element named "personID" in the sch...
Say I have two sets of XML elements:
<One/>
<Two/>
<Three/>
And
<A/>
<B/>
<C/>
And I want to have them as children of a bucket element:
<Bucket>
<A/>
<One/>
</Bucket>
Or
<Bucket>
<C/>
<Two/>
</Bucket>
But I don't want to allow more than one element from either set of elements. I.e:
<Bucket>
<A/>
<B/>
<On...
What would it mean to create something like the following?
<xsd:simpleType name="myField">
<xsd:restriction base="xsd:boolean"/>
</xsd:simpleType>
Notice there are no actual elements within the restriction (no min or max length, no enumerations, etc). I feel like this is basically setting the type of myField to xsd:boolean.
Howe...
Looking at Java and C# they manage to do some wicked processing based on special languaged based anotation (forgive me if that is the incorrect name).
In C++ we have two problems with this:
1) There is no way to annotate a class with type information that is accessable at runtime.
2) Parsing the source to generate stuff is way to compl...
My Java application's save files are in XML, and in certain cases, a user might want to merge two save files together. What packages have people used to do this? Any caveats to offer?
...
Can somebody explain me why this T-SQL code only returns one row with the value "1"? I was expecting to get two rows ("1" and "2"). Am I missing something here?
DECLARE @XMLDoc2 XML
SELECT @XMLDoc2 = '<ids><id>1</id><id>2</id></ids>'
DECLARE @handle2 INT
EXEC sp_xml_preparedocument @handle2 OUTPUT, @XMLDoc2
SELECT * FROM OPENXML (@ha...
I'm attempting to use JSPX (pure XML syntax for JSP) and running into what seems like it should work, but doesn't. I'm importing taglibs using namespace declarations in the jsp:root element, then using these later on for elements as well as EL functions:
<jsp:root version="2.0"
xmlns:jsp="http://java.sun.com/JSP/
xmlns:c="urn:j...
I'm writing an xml file to be consumed by excel.
excel wants this:
<Cell><Data ss:Type="Number">25</Data></Cell>
I'm writing this...
<Cell>
<Data ss:Type="Number">25</Data>
</Cell>
I get that EXCEL is picky, but since I'm using XElelments, how do i control the formatting of the output?
here is my code to write a cell.
foreach...
hello..
i have a problem which is how to get url attachment and display the attachment in form.
what i know is method xdImage:getImageUrl is using to display the attchment if node(datsource) have in form.
to display the data from datasaource into form, that data must be save in my database.
but situasion is my attachment,i put in other l...
I have a simple XML structure:
<Receipt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ReceiptID="0" UserID="0" UserCardID="0" PaymentMethodID="1" MerchantID="0" MerchantTaxID="MERCHANT_TAX_ID" MerchantReceiptID="MERCHANT_RECEIPT_ID" MerchantReceiptReferenceID="MERCHANT_RECEIPT_REF_I...
I am trying to match elements that have no other children elements, but also have content. No content also includes whitespace and characters. I need to do this in C#.
Take this XML for instance:
<1>
<2><3 /></2>
<4>
<5>This is match 1</5>
</4>
<6>
</6>
<7> ...
Hi all,
How can I add multiple namespace in the root node using .NET XmlDocument? Thanks!
...
Hi,
I'm pretty new to XSLT, but need to use it for a CMS using at the moment. I've already come up with a problem, but I'll try to describe my it without going into too much information about the underlying CMS. If you need more context to help me, I can add it in.
So all I want to do is test if a node of my xml is a descendant of a pa...
I am unable to load an XML file into a JavaScript Document in Google Chrome with the following function:
// load XML document based on whether the browser is IE or other browsers
function loadXMLDocument(url)
{
var doc;
if (window.ActiveXObject) // IE
{
doc = new ActiveXObject("Msxml2.DOMDocument.6.0");
doc.async ...
Hi all,
I'm using .NET XmlSerializer, XmlSchema and XmlReader to deserialize an XML document. Which exceptions may be thrown during validation and deserialization, since there are so many classes involved?
Thanks in advance!
...
Which is faster, XML with XSLT or CLR with DataBinding?
I'm assuming that it's CLR + Databinding but I could be wrong.
...