Questions tagged [xml-literals]
42 questions
9
votes
5 answers
Programming Languages that support XML literals
What are all the programming languages that support XML literals natively or via extension? I know of VB.NET, Scala, and Factor. Any others?

missingfaktor
- 90,905
- 62
- 285
- 365
7
votes
2 answers
How to prevent HTML encoding for embedded expressions in XML Literals (VB.NET)?
With the following code:
Dim x As System.Xml.Linq.XElement = _
<%= message.ToString() %>
Dim m = x.ToString()
...if message is HTML, then the < and > characters get converted to < and &rt;.
How can I force it to skip this…
Larsenal
- 49,878
- 43
- 152
- 220
7
votes
1 answer
Recursion with XML Literals in VB.NET is possible?
I have a class called Profile that has some simple properties and then it can have a collection of ProfileItem that again has some simple properties and then it can have a collection of ProfileItem (RECURSION).
Now I am trying to generated a very…

Drake
- 8,225
- 15
- 71
- 104
6
votes
3 answers
XML literals in JavaScript?
E4X (Ecma-357) is an extension to ECMAScript that adds XML literals as first-class primitives. That's awesome, but with only Mozilla and Adobe support (without V8 and IE support too), E4X is virtually dead from a web developer's perspective that…

ChrisOh
- 289
- 1
- 3
- 8
5
votes
2 answers
How can I embed XElements into XML literals in VB.NET?
In VB.NET I can easily embed strings into XML literals using <%= "my string" %> .
How can I embed an XElement instance?
I know I can use methods on the XElement, XNode, etc classes, but I'd like to do it in the XML literals if possible.

John Mills
- 10,020
- 12
- 74
- 121
5
votes
1 answer
Conditional XML Literal
I've tried searching on this but can't seem to find an answer anywhere, so hopefully someone here can help. I want to insert an conditional XML tag based on whether or not a count is above one, but am not sure how to do it.
For example, I have two…

Todd Main
- 28,951
- 11
- 82
- 146
4
votes
1 answer
Why Don't Dynamic XML Literals Inherit Default Namespace
I have an XElement that I need to create via dynamic xml literals/embedded expressions and I need it to inherit the default namespace. This doesn't appear possible though through everything I've tried. Does anyone know how to make this work?
For…

Todd Main
- 28,951
- 11
- 82
- 146
3
votes
1 answer
xml namespace and xml literals
I'm experimenting with xml literals in vb.net and there's something I don't get. Here's a small sample that illustrates the problem. I'm adding two PropertyGroup nodes to an empty Visual Studio project. The first one is added as xml literal, the…

jeroenh
- 26,362
- 10
- 73
- 104
3
votes
2 answers
How to produce integer literal as an attribute in Scala XML output?
I expect the following code to produce XML value with the following content:
Compiler gives of an error
scala> import scala.xml._
import scala.xml._
scala> val x:Int = 10
x: Int = 10
scala>

Basilevs
- 22,440
- 15
- 57
- 102
3
votes
4 answers
Using strings in XML Literals
I'm a C# developer who's fumbling in the first VB code he's written since VB6, so if I am asking a rather obvious question, please forgive me.
I decided to experiment with XML Literals to generate some XML code for me, instead of using XMLDocument
I…

johnc
- 39,385
- 37
- 101
- 139
3
votes
3 answers
VB.NET XML Literals Parsing
If I have a text stored in db, file, resource does not matter:
<%= Integer.MaxValue %>
Is there a way to do this:
Dim el As XElement = XElement.Parse({variable containing text above})
and to have it evaluate the expression…
epitka
- 17,275
- 20
- 88
- 141
2
votes
0 answers
Quickly create XML in C# VS VB.net
I made a module a while back that I used to create XML in VB.net. In this time, it was only in VB.net that you could do something that easily:
Dim completeXML =
…

David Brunelle
- 6,528
- 11
- 64
- 104
2
votes
3 answers
XSLT simplified stylesheet with xsl:attribute-set element
I'm trying to use the in my xsl document but I keep getting error messages:
compilation error: line 47 element attribute-set
element attribute-set only allowed as child of stylesheet
I've also checked the W3Schools website's…

stockoverflow
- 1,457
- 5
- 18
- 22
2
votes
1 answer
How to split html content into partials using Binding.scala?
I want to split my html content into different partials, so can combine them easily in different pages. I tried to code like this:
object App extends JSApp {
@dom def title2() = {