Hi, I'm using the JAXB xjc tool to generate some Java interface files from xsds. I'm running into a problem where I'm getting a tonne of errors of the form:
org.xml.sax.SAXParseException: ct-props-correct.4: Error for type 'COCT_MT110200CA.PayeeRole'. Duplicate attribute uses with the same name and target namespace are specified. N...
I'm attempting to pull certain elements from a Weather API to display weather conditions. First, I'm trying to grab the Weather Station name, which is the < icao > element in the feed inside the < station>.
Here is the feed XML file I'm trying to pull from: http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=94107
How...
I am getting some XML back from an AJAX call (no surprise) and I want to do something but only on certain nodes and something else on the rest. For example
<xml>
<node name="x">
</node>
<node name="x">
</node>
<node name="y">
</node>
<node name="z">
</node>
</xml>
I want all the nodes with name x to go to one table and...
Let's say I have an empty XML file like so:
<root></root>
And I want to add an element to root during an XSL transformation like so:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="@*|node()">
<xsl...
I have an xml document that I am creating using the loop below and the XML writer from C#. It currently works fine, but I wanted to implement a solution where every time the XML is written it automatically sorts it ascending using the driveStart field. I know people say you should do this in XSLT but I am having a hard time finding a g...
As a learning experience I'm developing a small Rails application that is supposed to query an existing SOAP API/web service (using the handsoap gem) and will simply present the information gathered there to a user.
I like using rspec and am getting used to cucumber for testing my applications. The part that has me stumped is how to tes...
We have a situation where we want to restrict an element to having:
Either text(). or
Subelements.
E.g.
<a>mytext</a>
or
<a><b>xxx</b></a>
But not:
<a>mytext<b>xxx</b></a>
Given the xs:simpleContent mechanism I can restrict it to having only text, and of course I can define the element(s) it can be allowed, but does anyone k...
I am just trying to create the XML
use XML::Simple;
my %element = ( "a" => "10" ,
"b" => "20" ,);
my $xs = new XML::Simple();
my $ref = $xs->XMLin(%element);
my $xml = $xs->XMLout($ref);
print $xml;
What is wrong on this code ? ( This is got Resolved )
use XML::Simple;
my %element = ( "a" => "10" ,
...
Hi,
Is there any good way (and a simple way too) using boost to read and write xml files?
I can't seem to find any simple sample to read xml files using boost? (can you point me some simple sample that use boost for reading and writing xml files)
If not boost, is out there any good and simple library to read and write xml files that y...
Hi, I want to create an XML file with folllowing header dynamically.
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitema...
I am trying to use DOM Parser in Java to parse a small XML file I pull off the net from its uri but receive an error complaining about missing semicolon.
Here's link 108:
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse("url_to_the_xml_file.xml");
Here's the error:
[Fatal Error] A01.xml:6:53: The charac...
Hi All,
Ive got a large XML set, which I would like to run some xpath on to make into a much smaller sub-set.
Basically, I have this type of layout:
<root>
<item>
<collection1></collection1>
<collection2></collection2>
<collection3></collection3>
...
<collection55></collection55>
<name>item name</name>
<ti...
I am a programmer, not a designer, so I prefer to let the computer do the creative work :-)
We would like to implement a dynamic flash banner on our website that gets created on-the-fly from an XML config file.
I would like to be able to set as many variables as possible in the XML config file, e.g.
pictures
fonts
text and background...
Following what seem to be the standard way to perform transformations using translets;
see http://xml.apache.org/xalan-j/xsltc_usage.html#api;
We perform the following steps
Set the javax.xml.transform.TransformerFactory
system property as indicated...
Instantiate a TransformerFactory.
Instantiate a Transformer object either directly...
hi,
I have a JavaScript function code where I want to alert.
function msg(x,y)
{
tempstr = x.value
if(tempstr.length>y)
{
alert(c_AcknowledgementText);
x.value = tempstr.substring(0,y);
}
}
Now I have an xml with below format:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<key name="c_ContactUsHeading">Contact Us</key>
...
I am attempting to receive a stream of XML events over a Java NIO channel. I am new to both NIO and StAX parsing, so I could very easily be overlooking something :)
My search has led me to several SAX and StAX implementations, but they all seem to operate on InputStreams and InputSources--not NIO channels. The two closest attempts I hav...
Hi all,
I'm having some trouble parsing malformed XML in PHP. In particular I'm querying a third party webservice that returns data in an XML format without encoding the XML entities in actual data. For example one of the the elements contains an ASCII heart, '<3', without the quotes, which the XML parser sees as an opening tag. It s...
I would like to set up an XSD such that it enforces something like a foreign key relationship. Here's an example:
<MappingElement Reference="MySourceElementName"/>
<SourceElement Name="MySourceElementName"/>
I would like to specify in the XSD that for any value assigned to the attribute "Reference" must also be a value of a Name ...
So I've got a situation where I need to pass a bunch of data to the server to create a bunch of records. So I read this article and chose the XML method. So I've got the stored procedure all created in sql server 2005. But now I need to call it from asp.net code. Only all I've got for a database connection is an odbcconnection. I se...
This is a general theory question, but how is XInclude manifested? I understand the theory, but I have two questions about the implementation of it.
First, I assume there are "XInclude processors"? Just like XML has parsers, I assume there is something with processes XML files for XInclude references -- inflating the references with t...