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

  • Home
  • SEARCH
  • 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 8261307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:21:40+00:00 2026-06-08T03:21:40+00:00

I need to do some processing on some data from an Oracle database and

  • 0

I need to do some processing on some data from an Oracle database and then print it as XML. I’m using XMLElement and the methods that go with it. However, I’ve found that if I pass a varchar into a PL/SQL function and then pass that variable to XMLElement, it prints the variable name instead of its content, like so:

create or replace function gen_elem_tmp(label1 varchar2, value1 varchar2)
  return XMLType
is
  result_xml XMLType;
begin
  select XMLElement(label1,value1) into result_xml from dual;
  return result_xml;
end;

> select gen_elem_tmp('myname','myvalue') from dual;

GEN_ELEM_TMP('MYNAME','MYVALUE')
------------------------------------------------
<LABEL1>myvalue</LABEL1>

I’m guessing this is XMLElement ‘helpfully’ interpreting my variable name as a database column. Is there any way of getting it to use my variable’s contents, instead?

  • 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-06-08T03:21:44+00:00Added an answer on June 8, 2026 at 3:21 am

    Try this:

      select XMLElement(evalname label1,value1) into result_xml from dual;
    

    This appears to be by design. Without EVALNAME, label1 is used as a literal instead of a variable.

    (In normal SQL or PL/SQL programming this seems like a really awful idea. Maybe it makes sense in an XML context?)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to upload some data from an Oracle table to a SQL Server
I need to extract data from a DB2 table, run some processing on each
I need some help in using objects from Core Data with GCD; I seem
I need to export big amount of data from database. Here is classes that
I have a C++/CX app that is processing some data from a file. It
I have some tagged data that I am processing using lxml. When I open
I need to push some data from and old application using access to the
I need some PHP classes that deal with image processing in a good manner.
Basically I need to capture the video from videocamera do some processing on frames
I need to aggregate some array values from APIs in a background processing job

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.