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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:34:56+00:00 2026-05-16T11:34:56+00:00

Here is my attempt, xsd and classes created from xsd.exe Running my code I

  • 0

Here is my attempt, xsd and classes created from xsd.exe

Running my code I get error “There is an error in XML document (1, 2).” Inner exception {” was not expected.”}

Any help would be greatly appreciated.

Thanks!

XML Snippet:

 <xml>
  <creditBureau xmlns="http://www.transunion.com/namespace"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <document>response</document>
    <version>2.2</version>
    <transactionControl>
      <userRefNumber>260907</userRefNumber>
      <subscriber>
        <industryCode>P</industryCode>
        <memberCode>04784547</memberCode>
        <inquirySubscriberPrefixCode>1527</inquirySubscriberPrefixCode>
      </subscriber>...

XSD Snippet:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://www.transunion.com/namespace" 
           attributeFormDefault="unqualified" 
           elementFormDefault="qualified" 
           targetNamespace="http://www.transunion.com/namespace" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="creditBureau">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="document" type="xs:string" />
        <xs:element name="version" type="xs:decimal" />
        <xs:element name="transactionControl">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="userRefNumber" type="xs:unsignedInt" />
              <xs:element name="subscriber">...

Class Snippet:

[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.transunion.com/namespace")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.transunion.com/namespace", IsNullable=false)]
public partial class creditBureau {
    private string documentField;
    private decimal versionField;
    private creditBureauTransactionControl transactionControlField;
    private creditBureauProduct productField;

    public string document {
        get {
            return this.documentField;
        }
        set {
            this.documentField = value;
        }
    }

    public decimal version {
        get {
            return this.versionField;
        }
        set {
            this.versionField = value;
        }
    }

    public creditBureauTransactionControl transactionControl {
        get {
            return this.transactionControlField;
        }
        set {
            this.transactionControlField = value;
        }
    }

    public creditBureauProduct product {
        get {
            return this.productField;
        }
        set {
            this.productField = value;
        }
    }
}

Code Snippet:

    FileStream fs = new FileStream("XMLFile1.xml", FileMode.Open);
    XmlSerializer x = new XmlSerializer(typeof(creditBureau));
    creditBureau c = (creditBureau)x.Deserialize(fs);
  • 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-16T11:34:56+00:00Added an answer on May 16, 2026 at 11:34 am

    Assuming the XML you posted is exactly what you receive, the error occurs because the XML document is incorrect:

    <xml>
    

    Is not a valid XML declaration tag, it should be something like that:

    <?xml version="1.0" encoding="utf-8"?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my first attempt at validating XML with XSD. The XML file to
Here is my attempt: function makeAllTextBlack() { var document = app.activeDocument, textFrames = document.textFrames,
I'm trying to calculate time blocks from given date range. Here's my attempt: <?php
I'm getting this error: -[NSCFArray insertObject:atIndex:]: attempt to insert nil Here is the .m
I get the following exception when I attempt to unmarshall XML back into java
Here is the code Stream stream = request.InputStream; String xsd = // Path to
The code pasted here is an attempt to map a SIGSEGV to a java
Here's my attempt at the jQuery: $(document).ready(function(){ $('#bg').animate({ backgroundPosition: '320px 0px'}, 10000, 'linear'); });
Here's my attempt to get the last item in the dropdown and check it:
My attempt here is basically to hot-switch a component while the program is running.

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.