question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VB -> C#: XmlElement conversion not implemented for non-literals

See original GitHub issue

Input code

Dim element As XElement = <SetAttribute XPath=<%= entry.Code %>></SetAttribute>

Erroneous output

XElement element = XElement.Parse("<SetAttribute XPath=<%= entry.Code %>></SetAttribute>");

Expected output

XElement element = new XElement("SetAttribute", new XAttribute("XPath", entry.Code));

Details

Product in use: e.g. web converter

Version in use: newest

Any other relevant information to the issue, or your interest in contributing a fix.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Noah1989commented, Jan 19, 2022

I am starting on this issue now.

1reaction
BobFrankstoncommented, May 2, 2019

Also, if I understand the rules correctly

   dim a = el.@atr

becomes

  var a = el?.attribute("atr")?.value
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does XmlNode to XmlElement works in VB
SelectSingleNode("ui/initial_focus_fields");. Now to resolve this I cast as an XmlElement, but why would that work in vb and not in C#?.
Read more >
cannot convert from string to System.Xml.XmlNode error
You have an XmlNode and you get its OuterXml , which is a string , and you then pass that to the XmlElement.AppendChild...
Read more >
Pattern-Based XML Literals · Issue #483 · dotnet/vblang
Rather than produce an XElement , this literal produces a strongly-typed ContentPage object initialized correctly with the expected descendants.
Read more >
VB: Conversion for ParenthesizedVariableDesignation not ...
CONVERSION ERROR: Conversion for ParenthesizedVariableDesignation not implemented, please report this issue in '(oldValue, newValue)' at ...
Read more >
XmlConvert Class (System.Xml)
Encodes and decodes XML names, and provides methods for converting between common language runtime types and XML Schema definition language (XSD) types.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found