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 8508887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:17:05+00:00 2026-06-11T03:17:05+00:00

My XML may contain multiple param entries, each with key and value attribute likes

  • 0

My XML may contain multiple param entries, each with key and value attribute likes this:

<entry id="entry1">
    <classParams>
       <param key="pluginid" value="monitorPlugin" />
       <param key="pluginid2" value="monitorPlugin2" />
    </classParams>
</entry>

AND/OR one single classParams only containing one string like this:

<entry id="entry2">
    <classParams>
      Im a string
    </classParams>
</entry>

My DTD:

<!ELEMENT classParams ( #PCDATA | param* )* >
<!ATTLIST id CDATA #REQUIRED value CDATA #REQUIRED >
<!ELEMENT param ( #PCDATA ) >

How do I define my DTD correctly, concerning the two entry types and the attribute definition for only one type?

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

    I made it with this definition. I now only use id and put the value in param.

    <!ELEMENT classParams ( #PCDATA  | param )* >
             <!ELEMENT param ( #PCDATA ) >
             <!ATTLIST param 
                id CDATA #REQUIRED
             >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Perl program is processing an XML file. Some entries may contain & symbols.
Although the XML file being described by the XSD Schema may contain any unicode
This may be a beginner xml question, but how can I generate an xml
In my C# app, XML data may contain arbitrary element text that's already been
I have a string that may contain XML and normal string. I need to
I have an XML file, that may or may not contain a node called
Given this XML Schema snippet: <xs:element name=data> <xs:complexType> <xs:sequence> <xs:element name=param type=param minOccurs=0 maxOccurs=unbounded
I have an xml file DataConfiguration.xml with this entry <DataSource> <localdata> <add context=Localization> <parameter
Hashmap contains key and value(result of parsing an XML). Hashmap contains things in the
Hashmap contains key and value(result of parsing an XML). Hashmap contains things in the

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.