Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6625953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:50:10+00:00 2026-05-25T21:50:10+00:00

This questions is related to this thread regarding the use of XML combinator which

  • 0

This questions is related to this thread regarding the use of XML combinator which is part of the Google’s Scala gdata client library found here

  1. In the code posted, there was no parameter for elem(“segment”…) Wouldn’t this cause compiler to complain something like “could not find implicit value for parameter ns: (String, String)”

  2. How do you generate XML elements without each tag having a name space prefix added. For example, the code I generated looks like:

    <yt:entry xmlns:yt="http://gdata.youtube.com/schemas/2007">
        <yt:title type="TextType">MyTitle</yt:title>
        <yt:summary>My Summary</yt:summary>
    </yt:entry>
    

But I don’t want each tag to have the namespace prefix!! How do I use the combinator to generate such XML.

Here is what my pickler looks like:

def pickler: Pickler[YtPlaylist] = {
    (wrap (elem("entry",
           elem("title", text ~ attr("type", text))
           ~ elem("summary", text))(Uris.ytNs))
          (YtPlaylist.apply)
          ({p => new ~(p.title, p.titleType) ~ p.summary}))
}

case class YtPlaylist(title: String, titleType: String, summary: String)

The example I found on the web doesn’t specify the namespace, but without it I always gets compilation error. How do I generate XML elements without namespace??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:50:11+00:00Added an answer on May 25, 2026 at 9:50 pm

    Yes, you will need to define a namespace. Use the null prefix to define the default namespace:

    implicit val ns = (null: String, "http://gdata.youtube.com/schemas/2007")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is related to a question I asked here: Thread Locking in Ruby (use
This was one of my interview questions which i couldn't answer.... Is it related
I have two related questions hence I am asking them in this single thread.
I've look for this, and there's some related questions, but no one gives me
All my questions in this topic related to asp.net 2.0 While working on some
This question is related with one of my earlier questions.. Previous Post In there
I've looked at other questions on Stack Overflow related to this question, but none
This question is related to following thread. Prism RegionAdapter - Removing then Adding View
My question is related to this thread. Here is the code #include <stdio.h> int
I have one more question related to this thread. How to decode some number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.