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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:29:27+00:00 2026-05-19T01:29:27+00:00

I have an xml document that contains some html. <begin-line> <verse-num>6</verse-num>a mixed people<footnote id=f2>

  • 0

I have an xml document that contains some html.

<begin-line>
    <verse-num>6</verse-num>a mixed people<footnote id="f2">
        Or <i>a foreign people</i>; Hebrew <i>a bastard</i>
    </footnote> shall dwell in Ashdod,
</begin-line>

The verse-num element is the only element I wan’t validated, the rest I want valideted to one large group of a string type, which can hold html, and also sometimes some more xml (like footnote).

Here is the schema I have right now which doesn’t do the trick.

<xs:element maxOccurs="unbounded" name="begin-line">
    <xs:complexType mixed="true">
        <xs:sequence minOccurs="0">
            <xs:choice maxOccurs="unbounded">
                <xs:element name="verse-num">
                    <xs:complexType>
                        <xs:simpleContent>
                            <xs:extension base="xs:unsignedByte">
                                <xs:attribute name="begin-chapter" type="xs:unsignedByte" use="optional" />
                            </xs:extension>
                        </xs:simpleContent>
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:sequence>
        <xs:attribute name="class" type="xs:string" use="optional" />
    </xs:complexType>
</xs:element>

I am using XSD.exe to generate a class that I can deserialize this junk into.

It is generating a begin-line object with a verse-num type below it, and also an array of text, which are split by the html/xml tags inside of .

What I need is an xsd that can be used by XSD.exe to generate a begin-line class that will give me a verse-num type, and then one string property that will contain the rest of the content (including text, i’s, b’s, footnotes, xml/html).

I did some research and it seems like processContents will do the trick, but I can’t figure out where to put it.

When it comes down to it, I want to program against the object created by the XSD.exe like this.

var beginLine = new crosswaybiblePassageVerseunitBeginline();
Console.WriteLine((beginLine.Items[0] as crosswaybiblePassageVerseunitBeginlineVersenum).Value);
Console.Write(beginLine.Text);

or maybe even…

var beginLine = new crosswaybiblePassageVerseunitBeginline();
Console.WriteLine(beginLine.Versenum.Value);
Console.Write(beginLine.Text);
  • 1 1 Answer
  • 1 View
  • 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-19T01:29:28+00:00Added an answer on May 19, 2026 at 1:29 am

    I’m not sure how to setup the schema such that it’ll provide nice output from XSD.exe but you can specify “any number of elements with any name” in the output using a type with the definition:

    <xs:complexType name="AnyChildren">
        <xs:sequence>
            <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
        </xs:sequence>
        <xs:anyAttribute />
    </xs:complexType>
    

    For example to validate:

    <Module>
       <Title>Hello World</Title>
       <ProviderType>xyz</ProviderType>
       <Content />
       <MoreContent />
    </Module>
    

    You could use:

    <xs:complexType name="Module">
        <xs:sequence>
            <xs:element name="Title" type="xs:string" maxOccurs="1" />
            <xs:element name="ProviderType" type="xs:string" minOccurs="1" nillable="false" />
            <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
        </xs:sequence>
        <xs:anyAttribute />
    </xs:complexType>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xml document that contains some Item elements with ids. I want
I have a table that contains an xml document stored as a clob. TabA
I have an XML document which contains an element that is over 90,000 characters
I'm working in C# 3.5. I have a XML document that contains a character
I have an XML document that I'm trying to search through. The Main structure
I have an XML document that I generate from an Entity Framework object. The
I have an XML document that I load in and try to search with
I have an xml document that looks like this. <foo> <bar type=artist/> Bob Marley
I have an XML document that matches our site navigation something like this: <page
I have an XML document that includes XPath expressions that I need to use

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.