Questions tagged [xml-literals]
42 questions
8
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
- 86,952
- 56
- 271
- 360
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
- 45,294
- 40
- 140
- 210
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
- 7,919
- 15
- 66
- 102
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
- 2
- 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
- 9,390
- 11
- 69
- 113
5
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
- 31,359
- 10
- 76
- 141
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
- 31,359
- 10
- 76
- 141
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
- 24,301
- 9
- 67
- 99
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
- 18,490
- 15
- 51
- 98
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
- 36,657
- 37
- 96
- 137
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
- 16,049
- 19
- 81
- 130
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,190
- 10
- 57
- 101
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,397
- 4
- 17
- 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() = {