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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:46:24+00:00 2026-05-24T07:46:24+00:00

I’m trying to work with an application that i don’t have the source code

  • 0

I’m trying to work with an application that i don’t have the source code for. I’m trying to interface in some data in an XML file. i believe my file matches the applications required schema correctly, but i get the message “Could not find schema information for the element” for every element in my file. I’ve decomplied the applications code and rebuilt it in visual studio, and i get the error myself.

I’m going to go ahead and just dump the code… Its pretty long, but i’m starting to think its a pretty bone head mistake on my part.

The XML to be imported:

<WorkOrders>
    <WorkOrder>
        <Action>SAVE</Action>
        <UserDef1>NotRequired1</UserDef1>
        <UserDef2>NotRequired2</UserDef2>
        <UserDef3>NotRequired3</UserDef3>
        <UserDef4>NotRequired4</UserDef4>
        <UserDef5>NotRequired5</UserDef5>
        <UserDef6>NotRequired6</UserDef6>
        <UserDef7>-1</UserDef7>
        <UserDef8>-2</UserDef8>
        <AutoRelease>N</AutoRelease> <!--Probably can hardcode as N-->
        <BuildInstructions>Not Required BuildInstructions</BuildInstructions>
        <!--<BuildLocation>Not required BuildLocation</BuildLocation>-->
        <Company></Company> <!--should match compan on the item master-->
        <!--<DimensionUm></DimensionUm>-->
        <DueDate>12-31-2011</DueDate>
        <!--<Error></Error>-->
        <FinishedItem>SERIAL_TEST</FinishedItem>
        <QtyToBeBuilt>12345</QtyToBeBuilt>
        <!--<QtyUm></QtyUm>
        <RevisionNum></RevisionNum>-->
        <Warehouse>PPLant</Warehouse>
        <WeightUm></WeightUm>
        <WOAllocMethod></WOAllocMethod>
        <WorkOrderDetails>
            <Action>SAVE</Action>
            <UserDef1>NotRequired1</UserDef1>
            <UserDef2>NotRequired2</UserDef2>
            <UserDef3>NotRequired3</UserDef3>
            <UserDef4>NotRequired4</UserDef4>
            <UserDef5>NotRequired5</UserDef5>
            <UserDef6>NotRequired6</UserDef6>
            <UserDef7>-1</UserDef7>
            <UserDef8>-2</UserDef8>
            <AllocationRule>WorkOrderAllocation</AllocationRule>
            <BuildLevel>1</BuildLevel>
            <!--<BuildSequence>1</BuildSequence>-->
            <Company></Company>
            <ComponentItem>SERIAL_TEST</ComponentItem>
            <FromLocation></FromLocation>-->
            <!-- these fields allow users to increase/decrease the component quantity required
            <IncQtyAmount></IncQtyAmount>
            <IncQtyEligible></IncQtyEligible>
            <IncQtyMinAmount></IncQtyMinAmount>
            <IncQtyType></IncQtyType>-->
            <!-- <LogisticsUnit></LogisticsUnit>
            <Lot></Lot>
            <ParentLogisticsUnit></ParentLogisticsUnit>-->
            <QtyNeededPerItem>10</QtyNeededPerItem>
            <!--<QuantityUm></QuantityUm>-->
            <Warehouse>PPLant</Warehouse>
        </WorkOrderDetails>
        <WorkOrderId>ExampleWorkOrderID001</WorkOrderId>
        <AllocationRule>WorkOrderAllocation</AllocationRule>

    </WorkOrder>
</WorkOrders>

The schema:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="WorkOrderDownload" targetNamespace="http://www.asdf.com/asdfNET/Interface" elementFormDefault="qualified" xmlns="http://www.asdf.com/asdfNET/Interface" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2008">
    <xs:include schemaLocation="InterfaceEntity.xsd" />
    <xs:element name="WorkOrders" nillable="false" type="WorkOrderList" />
    <xs:complexType name="WorkOrderList">
        <xs:sequence>
            <xs:element minOccurs="1" maxOccurs="unbounded" name="WorkOrder" nillable="true" type="WorkOrder" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="WorkOrder">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="1" name="AutoRelease" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="BuildInstructions" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="BuildLocation" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="Company" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="DimensionUm" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="DueDate" type="xs:dateTime" />
            <xs:element minOccurs="0" maxOccurs="1" name="Error" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="FinishedItem" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="InterfaceEntity" type="InterfaceEntity" />
            <xs:element minOccurs="0" maxOccurs="1" name="InternalWorkOrderNum" type="xs:int" />
            <xs:element minOccurs="0" maxOccurs="1" name="ItemClass" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ItemColor" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ItemCost">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ItemDescription" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ItemHeight">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ItemLength">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ItemSize" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ItemStyle" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ItemValue">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ItemWeight">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ItemWidth">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="PlannedUnitBuildTime">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="QtyToBeBuilt">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="1" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="QtyUm" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="RevisionNum">
                <xs:simpleType>
                    <xs:restriction base="xs:int">
                        <xs:minInclusive value="1" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="VolumeUm" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="Warehouse" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="WeightUm" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="WOAllocMethod" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="WorkOrderDetails" type="WorkOrderDetailList" />
            <xs:element minOccurs="0" maxOccurs="1" name="WorkOrderId" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="WorkOrderDetailList">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="WorkOrderDetail" nillable="true" type="WorkOrderDetail" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="WorkOrderDetail">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="1" name="AllocationRule" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="BuildLevel">
                <xs:simpleType>
                    <xs:restriction base="xs:int">
                        <xs:minInclusive value="1" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="BuildSequence">
                <xs:simpleType>
                    <xs:restriction base="xs:int">
                        <xs:minInclusive value="1" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="Company" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ComponentItem" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="FromLocation" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="IncQtyAmount" type="xs:double" />
            <xs:element minOccurs="0" maxOccurs="1" name="IncQtyEligible" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="IncQtyMinAmount">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="IncQtyType" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="InterfaceEntity" type="InterfaceEntity" />
            <xs:element minOccurs="0" maxOccurs="1" name="InternalWorkOrderNum">
                <xs:simpleType>
                    <xs:restriction base="xs:int">
                        <xs:minInclusive value="0" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="LogisticsUnit" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="Lot" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="ParentLogisticsUnit" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="QtyNeededPerItem">
                <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="1" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="QuantityUm" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="Warehouse" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
</xs:schema>

the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Schema;

namespace WorkOrderInterfaceValidation
{
    class Program
    {
        static void Main(string[] args)
        {
            helper h = new helper();
            h.main();
        }
    }

    class helper
    {
        StringBuilder _valErrorMsgs;

        public helper()
        {
            _valErrorMsgs = new StringBuilder();
        }

        public void main()
        {
            try
            {
                string error = "No error";
                Console.WriteLine("hello world");

                ValidateSchemaWithURI("C:\\Program Files\\software\\asdf\\2010\\Interface\\Input\\ExampleWorkOrder001.xml",
                    "http://www.asdf.com/asdfNET/Interface",
                    "\\\\localhost\\asdf\\Schemas\\Interface\\WorkOrderDownload.xsd",
                    out error
                    );

                error += " err";
                Console.WriteLine(error);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            Console.ReadKey();
        }

        public XmlReader ValidateSchemaWithURI(string inputUri, string targetNamespace, string schemaPath, out string error)
        {
            //StringBuilder _valErrorMsgs = new StringBuilder();
            XmlReader reader = null;
            XmlReader reader2;
            try
            {
                XmlReaderSettings settings = new XmlReaderSettings();
                settings.Schemas.Add(targetNamespace, schemaPath);
                settings.IgnoreWhitespace = true;
                settings.ValidationType = ValidationType.Schema;
                settings.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings;
                settings.ValidationEventHandler += new ValidationEventHandler(this.SchemaValidationEventHandler);
                reader = XmlReader.Create(inputUri, settings);

                foreach (var v in settings.Schemas.Schemas())
                {
                    foreach (var e in ((XmlSchema)v).Attributes)
                    {
                        e.ToString();
                    }
                }

                while (reader.Read())
                {

                }
                reader2 = reader;
            }
            catch (XmlException exception)
            {
                _valErrorMsgs.Append(exception.Message).Append(";");
                Console.WriteLine(exception.Message);
                reader2 = null;
            }
            finally
            {
                error = _valErrorMsgs.ToString();
                if (reader != null)
                {
                    reader.Close();
                }
            }
            return reader2;
        }

        private void SchemaValidationEventHandler(object sender, ValidationEventArgs args)
        {
            this._valErrorMsgs.Append(args.Exception.Message).Append(";");
        }
    }
}

The error message:

XmlException: Could not find schema information for the element ‘WorkOrders’.;Could not find schema information for the element ‘WorkOrder’.;Could not find schema information for the element ‘Action’.;Could not find schema information for the element ‘UserDef1’.;Could not find schema information for the element ‘UserDef2’.;Could not find schema information for the element ‘UserDef3’.;Could not find schema information for the element ‘UserDef4’.;Could not find schema information for the ….

  • 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-24T07:46:26+00:00Added an answer on May 24, 2026 at 7:46 am

    I think you’re missing the namespace. Try:

    <WorkOrders xmlns="http://www.manh.com/ILSNET/Interface">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have some data like this: 1 2 3 4 5 9 2 6
I have a French site that I want to parse, but am running into
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to create an if statement in PHP that prevents a single post
I have a reasonable size flat file database of text documents mostly saved in
I'm parsing an XML file, the creators of it stuck in a bunch social

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.