We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in scala console
following code works correctly:
scala> val e = <ns:elems xmlns:ns="http://">{List(1, 2, 3).map(x => <ns:elem>{x}</ns:elem>) ++ List(4, 5, 6).map(x => <ns:elem>{x}</ns:elem>)}</ns:elems> e: scala.xml.Elem = <ns:elems xmlns:ns="http://"><ns:elem>1</ns:elem><ns:elem>2</ns:elem><ns:elem>3</ns:elem><ns:elem>4</ns:elem><ns:elem>5</ns:elem><ns:elem>6</ns:elem></ns:elems> scala> e \ "elem" res0: scala.xml.NodeSeq = NodeSeq(<ns:elem xmlns:ns="http://">1</ns:elem>, <ns:elem xmlns:ns="http://">2</ns:elem>, <ns:elem xmlns:ns="http://">3</ns:elem>, <ns:elem xmlns:ns="http://">4</ns:elem>, <ns:elem xmlns:ns="http://">5</ns:elem>, <ns:elem xmlns:ns="http://">6</ns:elem>)
scala> e \ "elem" res0: scala.xml.NodeSeq = NodeSeq(<ns:elem xmlns:ns="http://">1</ns:elem>, <ns:elem xmlns:ns="http://">2</ns:elem>, <ns:elem xmlns:ns="http://">3</ns:elem>, <ns:elem xmlns:ns="http://">4</ns:elem>, <ns:elem xmlns:ns="http://">5</ns:elem>, <ns:elem xmlns:ns="http://">6</ns:elem>)
namespace is correct in each child node.
while if using method call, namespace gets lost:
scala> def f(l: List[Int]) = l.map(x => <ns:elem>{x}</ns:elem>) f: (l: List[Int])List[scala.xml.Elem] scala> val e = <ns:elems xmlns:ns="http://">{f(List(1, 2, 3)) ++ f(List(4, 5, 6))}</ns:elems> e: scala.xml.Elem = <ns:elems xmlns:ns="http://"><ns:elem>1</ns:elem><ns:elem>2</ns:elem><ns:elem>3</ns:elem><ns:elem>4</ns:elem><ns:elem>5</ns:elem><ns:elem>6</ns:elem></ns:elems> scala> e \ "elem" res2: scala.xml.NodeSeq = NodeSeq(<ns:elem>1</ns:elem>, <ns:elem>2</ns:elem>, <ns:elem>3</ns:elem>, <ns:elem>4</ns:elem>, <ns:elem>5</ns:elem>, <ns:elem>6</ns:elem>)
scala> val e = <ns:elems xmlns:ns="http://">{f(List(1, 2, 3)) ++ f(List(4, 5, 6))}</ns:elems> e: scala.xml.Elem = <ns:elems xmlns:ns="http://"><ns:elem>1</ns:elem><ns:elem>2</ns:elem><ns:elem>3</ns:elem><ns:elem>4</ns:elem><ns:elem>5</ns:elem><ns:elem>6</ns:elem></ns:elems>
scala> e \ "elem" res2: scala.xml.NodeSeq = NodeSeq(<ns:elem>1</ns:elem>, <ns:elem>2</ns:elem>, <ns:elem>3</ns:elem>, <ns:elem>4</ns:elem>, <ns:elem>5</ns:elem>, <ns:elem>6</ns:elem>)
Imported from : SI-4865
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in scala console
following code works correctly:
namespace is correct in each child node.
while if using method call, namespace gets lost:
Imported from : SI-4865
The text was updated successfully, but these errors were encountered: