Can an XML attribute be the empty string?
Can an XML attribute be the empty string? In other words, is "<element att="" />" valid XML? ...
Can an XML attribute be the empty string? In other words, is "<element att="" />" valid XML? ...
I'm trying to convert an XML file into the markup used by dokuwiki, using XSLT. This actually works to some degree, but the indentation in the XSL file is getting inserted into the results. At the moment, I have two choices: abandon this XSLT thing entirely, and find another way to convert from XML to dokuwiki markup, or delete about 9...
I have two XmlDocuments and I would like to move an XmlNode selected from one of the documents and append it at a particular location in the other document. The naively intuitive approach of simply calling AppendNode(xmlNodeFromDocument1) at the appropriate place of document 2, of course doesn't work because the method does not take car...
The XML I'm trying to validate is as follows: <root> <element attribute="foo"> <bar/> </element> <element attribute="hello"> <world/> </element> </root> How can this be validated using a Schema? Note: element can only contain bar when attribute="foo". element can only contain world when attribute="he...
Modern RDBMS's have support for XML column types and functionality for dealing with XML in stored procedures. Historically I would always have mapped hierarchical data (whether of OO objects or XML) to relational tables. Given the widespread database support for XML should I change my ways? ...
I believe the simplest way to request data from a server in XML format is to have a PHP/JSP/ASP.net page which actually generates XML based on HTTP GET params, and to somehow call/load this page from Flex. How exactly can this be achieved using the Flex library classes? ...
I have an XSL stylesheet with content in an xsl:text node like this: <xsl:text> foo bar baz </xsl:text> The stylesheet itself is a text file with "unix-style" newline line terminators. I invoke this stylesheet on Windows as well as unix-like platforms. It would be nice to have the output conform to the conventions of the platform on w...
A project I'm working on will pull XML from a web-server and build a data store from it. The data will have certain core fields but needs to be extendable... for example I have a and later might want to have which adds extra fields. In the Flex app, I don't want the central data store to be working on XML objects or simply putting the...
Hi, I need to add a "xml:lang" attribute on the root xml node in the outbound doument from Biztalk. This is a fixed value, so it may be set in the schema or something. This is what I want to get out: <Catalog xml:lang="NB-NO"> ... </Catalog> I've tried to define the attribute "xml:lang", but it doesn't allow me to use ":" in the sch...
Hi, I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before? ...
What avenues are there for using an XSD to generate message instances? I seem to remember reading about generating classes from XSD, but can't find anything specific now. I know you can generate classes and datasets from XSD, but I'm looking for a pattern for automating the actual generation of the messages. BTW, SO is my knowledge sh...
I'm having trouble selecting elements that are part of an specific namespace. My xpath expression works in XMLSpy but fails when using the Xalan libraries.. <item> <media:content attrb="xyz"> <dcterms:valid>VALUE</dcterms:valid> </media:content> </item> My expression ./item/media:content/dcterms:valid. I've already added b...
i am developping a little app that retrieves an XML file, located on a remote server (http://xxxx.com/myfile.xml) This file is relatively big, and it contains a big list of geolocations with other informations that i need to use for my app. So i read this file remotely once and insert it into a little SqlCE file (database.sdf) So If I n...
I have XML that looks like <answers> <answer> <question-number>1</question-number> <value>3</value> <mean xsi:nil="1" /> </answer> <answer> <question-number>2</question-number> <value>2</value> <mean>2.3</mean> </answer> <answer> <question-number>3</question-number> <value...
I am attempting to rewrite my ForestPad application utilizing WPF for the presentation layer. In WinForms, I am populating each node programmatically but I would like to take advantage of the databinding capabilities of WPF, if possible. In general, what is the best way to two-way databind the WPF TreeView to an Xml document? A generi...
I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality. I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do both have? Any other parsers you've used? ...
I need to dynamically construct an XPath query for an element attribute, where the attribute value is provided by the user. I'm unsure how to go about cleaning or sanitizing this value to prevent the XPath equivalent of a SQL injection attack. For example (in PHP): <?php function xPathQuery($attr) { $xml = simplexml_load_file('exa...
i have an xml document: var xml:XML = new XML(<rootNode> <head> <meta name="template" content="Default" /> </head> <mainSection> <itemList> <item> <video src={this.videoURL} /> <img src={this.src}></img> </item> </itemList> </mainSection> ...
I have already extracted the tag from the source document using grep but, now I cant seem to figure out how to easily extract the properties from the string. Also I want to avoid having to use any programs that would not usually be present on a standard installation. $tag='<img src="http://imgs.xkcd.com/comics/barrel_cropped_(1).jpg"...
Hi, I am looking to use Cocoon for a couple of sites I am creating. I will make heavy use of xml, xsl and conversion to html, pdf and excel on the sites. I am attracted to coccon as it implements these functions quite well. I guess I am just wondering if anyone has used it and like it, or if they found it was more trouble than it's wo...