Converting XML file to DTD or XSD file

Hi everyone,
We're currently doing an IDOC to File. The file should be in XML format. Right now, we have a sample XML file. We need to convert the file to DTD or XSD and then upload this in XI to be able to get it structure. We've tried different conversion tools to do this, however, the converted DTD/XSD file still has errors when we load it to XI. What we're thinking is to create a data type to achieve this. These are some of the fields in the file.
<messageHeader creationDate>
<catellae:gTTSDataDelivery creationDate="X" (...)>
*/<catellae:(…)>/<txnId>
*/<catellae:(…)>/<items>/<item>/<quantity>
*/<catellae:(…)>/<items>/<item>/<unitOfMea>
*/<catellae:(…)>/<items>/<item>/<prodDesc>/<matType>
*/<catellae:(…)>/<shipToAddress>/<nameAndAddress>/<city>
*/<catellae:(…)>/<shipToAddress>/<contactInformation>/<communicationChannel (…)
It seems that there are more than 3 nodes. And in XI, only three nodes are allowed. Could you tell us how should we create the data type for this? Thanks in advance!

Hi Mariel,
          Refer to the below link for conversion of XML to Xsd using Altova XML Spy.
Re: data type for xml file
For altova free trial Download:
http://www.altova.com/download.html
Please let me know if u need furthur information.
Thanks,
Bhargav.
Note:Award points if found useful

Similar Messages

  • External dependency on remote dtd and xsd files

    The question bugs me for years, please help.
    Should we download external dtd and xsd files declared for web.xml and faces-config.xml and pack them in the war files to eliminate the external dependency.
    e.g.
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
    http://java.sun.com/dtd/web-facesconfig_1_0.dtd
    Thanks

    Hi Srikanth,
    Have you done this?
    SAP HELP
    <i>You want to import an XSD document myMessage to the Integration Repository; this document references three other XSD documents myStr1, myStr2, and myStr3 by using the <include> statement. One option is to first import myMessage. The External References tab page then shows that three documents are referenced and that these documents are not yet in the Integration Repository.  Next, create further external definitions for myStr1, myStr2, and myStr3 in the same namespace and specify the source for each of these documents. If the source is not contained in the document itself, you will find it in the referencing document. If you refresh the display of the external definition for myMessage, the External References tab page shows that the documents have been found in the Integration Repository. You can then navigate to the other referenced external definitions in the Integration Repository by double clicking.</i>
    Also, try activating just in case you haven't.
    Regards
    Vijaya

  • Create XML File from a specified XSD file

    Hi,
    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
    Thanks.

    Hi,
    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
    Thanks.

  • Problem with import tag in xsl files and include in xsd files

    Hello,
    I've been developing an application using JBoss as server. Then, i created an especific path for xsd and another path for xsl files. In both cases, i created a main file that include (xsd) or import (xsl) the other files. My problem is that i have to specify the exactly path where the imported xsl or the included xsd files are, even though they are in the same path as the main file. What i want to know is how i say that the other xsd and xsl files are in the same path that the main file that is importing them?
    here's an example of my import and include declarations:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:import href="../server/jboss/deploy/application.ear/pack.jar/xsl/transformer1.xsl"/>
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              elementFormDefault="qualified">
         <xsd:include schemaLocation="../server/jboss/deploy/application.ear/pack.jar/xsd/schema1.xsd"/>
    thanks for your help

    yes, thats not the value returned of
    URL url = this.getClass().
                        getResource("/xsl//transformer.xsl");the expression i posted is an string i'm using to test.... but i think it's not incorrect, because if the files i'm trying to open are not in the path, he throws the following exception:
    java.io.FileNotFoundException: C:\cpqd\isp\tools\third-party\jboss\server\jbossISP1\deploy\cpqd-ispeng-EngEJB-3.3.0.0.ear\cpqd-ispinv-ServiceEJB.jar\xsl\isp_transformer_manufacturer.xsl
        at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:80)
        at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:89)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:323)
        at org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:192)
        at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:668)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:972)
        at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:788)
        at br.com.cpqd.oss.isp.service.adapter.FrameworkAdapter.createExternalData(FrameworkAdapter.java:131)
        at br.com.cpqd.oss.isp.service.message.ExternalDataMDBBean.onMessage(ExternalDataMDBBean.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
        at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:284)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
        at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
        at org.jboss.ejb.Container.invoke(Container.java:709)
        at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:928)
        at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1205)
        at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
        at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
        at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
        at org.jboss.mq.SpySession.run(SpySession.java:351)
        at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
        at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
        at java.lang.Thread.run(Thread.java:534)and when the files are in the path, he throws the other exception... thats why i think the problem it's not the URL....

  • Register XSD-Files which includes Other XSD-Files

    Hallo
    i have two XML-Schemata. One is included by the other.
    Here is an example:
    This is the XSD, which is included by the other (metadata.xsd):
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <!-- Metadatenbereich für das xml-Dokument selbst-->
         <xs:element name="metadata" type="metadataType">
              <xs:annotation>
                   <xs:documentation>ROOT ELEMENT von Metadata</xs:documentation>
              </xs:annotation>
         </xs:element>
         <!-- Glossar: Metadatenbereich + Glossarinhalt als Liste von Glossareinträgen -->
         <xs:complexType name="metadataType">
              <xs:sequence>
                   <xs:element ref="identifier"/>
                   <xs:element ref="category"/>
                   <xs:element ref="creator"/>
                   <xs:element ref="creation_date"/>
                   <xs:element ref="publisher"/>
                   <xs:element ref="language"/>
                   <xs:element ref="title"/>
                   <xs:element ref="basic_year"/>
                   <xs:element ref="statistic"/>
    This is the XSD, which include the other XSD (lexikon.xsd):
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="unqualified" attributeFormDefault="unqualified">
         <!-- Includieren der Metadaten-->
         <xs:include schemaLocation="metadata.xsd"/>
         <!-- ROOT Element von Lexikon-->
         <xs:element name="lexikon" type="lexikonType" xdb:defaultTable="LEXIKON">
              <xs:annotation>
                   <xs:documentation>ROOT ELEMENT</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="lexikonType">
              <xs:sequence>
                   <xs:element ref="metadata"/>
                   <xs:element ref="lexikonEntries"/>
              </xs:sequence>
              <xs:attribute name="lexikonKat" type="xs:integer">
                   <xs:annotation>
                        <xs:documentation>für spezielle UnterkategorienTypen zu den Lexikas</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
         </xs:complexType>
         <!---->
         <!-- GLOSSAR-ELEMENTE -->
         <!---->
         <!-- ExplicationTxt-->
         <xs:element name="explicationTxt" type="explicationType"/>
         <xs:complexType name="explicationType">
              <xs:choice>
                   <xs:element ref="verweis"/>
                   <xs:element ref="txt"/>
                   <xs:element ref="para"/>
    Both documents have i copied to a webdav-folder. Now i want register the documents.
    BEGIN
    DBMS_XMLSchema.registerSchema(
    schemaurl=>'http://190.1.1.148:8080/home/DEV/xsd/lexikon.xsd',
    schemadoc=>sys.UriFactory.getUri('/home/DEV/xsd/lexikon.xsd'));
    END;
    The following error-message is displayed:
    ERROR at line 1:
    ORA-31000: Resource 'metadata.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 166
    ORA-06512: at line 2
    I made the XSD-Files by XMLSpy. The Documents are well-formated and valid.
    When i make a new XML-File based ONLY (of course) on lexikon.xsd everything works fine with XMLSpy.
    How must i register these documents? Is it possible? Or can´t i register XSD-Files which includes others?
    Thank you very much
    cu
    Heidi

    Heidi,
    register the metadata.xsd first inthe same way and then register the lixikon.xsd.
    it should work.

  • How to import a XSD schema files hierarchy (=mulitple dependent XSD files)?

    Assume I have a XSD schema file hierarchy in my local directory
    D:\bpelprojects\projXSDs\proj123\*
    The "main" XSD
    D:\bpelprojects\projXSDs\proj123\main.xsd
    imports internally other XSDs (files) from other directories. So we have a whole set of depending XSD schema files.
    Now I want to import the top-most XSD main.xsd (see above) as a XSD schema for one of my BPEL process in JDeveloper. When I rightclick on "Schema" in the "Structures" pane in JDeveloper and import the main.xsd then it seems to me that the other (dependent) XSD files are NOT imported as well (or only sometimes under some circumstances). They are at least not copied to the BPEL project folder
    How can I assign a hierarchy of XSD files to a WSDL otherwise WITHOUT to copy and enter them all manually and individually in the WSDL?
    Peter

    HI,
    Make sure that you use all the relative paths while referring those XSDs in the BPEL/XSD files. Otherwise you will see the problems ar runtime.
    As a jeneral rule... if the schemas are public put them in system/xmllib directory and refer them using the localhost:7778/xmllib/...
    or copying them into the BPEL folder and referring them with relative paths like "main.xsd" or abc/sub.xsd.
    If you are ferering the main inside the sub then ../main.xsd should be mentioned in the sub.xsd.
    Hope this makes clear.
    -- Khaleel

  • How to convert XML file into DTD or XSD

    Hi Folks,
    This is the output structure I need to get. My interface is file to file. Can u please let me know How do I create a data type or any XSD to get below Structure.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Command xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Command.xsd">
    - <WriteTagData readerID="EasyDP">
    - <Item>
    - <FieldList format="C:\Documents and Settings\wlee\Desktop\Format_4A.btw" jobName="Test1" quantity="1">
      <Field name="PlantNo">4012</Field>
      <Field name="PlantName">ANE</Field>
      <Field name="SKU">12000001</Field>
      <  </FieldList>
      </Item>
      </WriteTagData>
      </Command>
    Please help me How would I create Data type for this. Your help is highly apreciated
    Thanks,
    Enivass

    Hi Enivas,
    >>>>>>>>>Please help me how would I delete ns0.
    For  remove ns0,  you have to do use XMLAnonymizerBean module  in adpater module (In Communication channel).
    Insert the XMLAnonymizerBean before the CallSapAdapter .
    The module name u2018CallSapAdapteru2019 is default one that can be left as it is.
    Module Name : AF_Modules/XMLAnonymizerBean
    Type: Local Enterprise Bean
    Module Key: 0  
    Add Parameters in the Module Configuration
    2.       Module Key: 0
    Parameter Name: anonymizer.acceptNamespaces
    Parameter Value: <namespace> u2018u2019  
    Enter a list of namespaces and their prefixes that are to be kept in the target XML document and to result a namespace without a prefix, enter u2018 u2018 (two single quotation marks).   In your case like namespace http://www.w3.org/2001/XMLSchema-instance follow with two single quotation marks.
    3.       Module Key: 0
    Parameter Name: anonymizer.quote
    Parameter Value: u2018
    Here specify the character to be used to enclose the attribute values.  The default value is u2018.  
    When scenario is executed, the target message contains the namespace with no prefix.  
    Then, you are not facing any issue in target messages.
    Regards,
    Rajesh

  • Xml file with DTD in jar file

    Dear all,
    I developed an application using NetBeans which lets you create XML files.
    The process of creating the new XML file, set the attribute Doctype of these files to the DTD (fileXML.dtd) present in the build / classes / Dtd that is loaded during implementation through:
    URL url=ClassLoader.getSystemClassLoader().getResource("Dtd/fileXML.dtd");so the attribute Doctype XML files created will have the location of the DTD fileXML.dtd:
    <?xml version="1.0"?>
    <!DOCTYPE AGSet SYSTEM "file:/F:/Documents%20and%20Settings/ioXp/Desktop/mioProgramma/build/classes/Dtd/fileXML.dtd">
    Well. After completing the development of the program, I created the executable miaApplicazione.jar (in which he was pulled inside your full Buil, including build / dtd) by the option of NetBeans "Build Main Project."
    Double-clicking the file miaApplicazione.jar the program runs properly.
    The problem now is that when I create the XML file by mioProgramma.jar, they will refer to this DTD within miaApplicazione.jar and consequently when trying to open these files XML message appears:
    Protocol specified unknown. Error processing resource "jar:file:/F:/Documents%20and%20Settings/ioXP/...
    <?xml version="1.0"?>
    <!DOCTYPE AGSet SYSTEM "jar:file:/F:/Documents%20and%20Settings/ioXp/Desktop/miaApplicazione/...
    What is the solution for this problem?
    Hi
    ELVIO

    Hi swanelvis ,
    I have the same issue. Were you able to resolve this ?
    Thanks

  • DTD and XSD Validation for xml file

    hi kindly reply to this mail guru'ssss
    i am facing a problem in parising a xml file against dtd and xsd.
    i have the dtd which contains only enitities that can be present in the xml file and the xsd file for validation against elements and attribute.
    when DTD is present then it is throwing errors like the elements should be declared.
    when i take out the doctype line and validate against schema its throwing the error that particular entity is not found or declared.
      public Vector validateSchema(String SchemaUrl, String XmlDocumentUrl)  
          SAXParser parser =new SAXParser();
         try{
             //parser.setNamespaceAware (true);     
             //parser.s
             parser.setFeature("http://xml.org/sax/features/validation",true);
             parser.setFeature("http://apache.org/xml/features/validation/schema",true);
             parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
            // parser.setProperty("http://xml.org/sax/properties/declaration-handler", new DTDHandl());
             parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",SchemaUrl);
            // parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
            // System.out.println(parser.getDTDHandler());
            // UnparsedCache cache = new UnparsedCache();
           //  parser.setDTDHandler(cache);
             InputSource inputSource =new InputSource(new java.io.FileInputStream(new java.io.File(XmlDocumentUrl)));
           //  parser.setDTDHandler(new myDTDHandler());
             //parser.setEntityResolver(new CustomResolver());
         //  parser.setContentHandler(this);
             Validator handler=new Validator();
             parser.setErrorHandler(handler); 
             parser.parse(inputSource);
             if(handler.validationError==true)
               System.out.println("XML Document is not valid");
             else                  
               System.out.println("XML Document is valid");
             for(int i=0;i<ErrorLines.size();i++){
                 System.out.println(ErrorLines.elementAt(i));
       }catch(java.io.IOException ioe){  
         System.out.println("IOException"+ioe.getMessage());   
       }catch (SAXParseException e) {
         System.out.println("SAXParseException "+e.getMessage());   
      }catch (SAXException e) {
         System.out.println("SAXException"+e.getMessage());   
         return ErrorLines;
    what could be soln to this.

    Hi
    Venky_Ferrari.
    Based on your description, your case related to XMLXSD, SO I will move your thread to
    Data Platform Development > XML, System.Xml, MSXML and XmlLite      
    forum for better support.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Validate a XML file with a XSD File in ABAP

    Hi everybody,
    I am searching a way for validating a XML File with an external XSD File in ABAP. I know to validate with dtd is possible, but what about XSD?
    Can you help me in my urgend problem ?
    Greetings from Germany
    ismail er

    anyone an idea for my issue ???

  • ODI : create an XML model with UBL  technology instead of XSD file

    Hello,
    I have several xsd files which contain UBL (Universal Business Language) and all these files are linked between them. In Oracle Data Integrator, I would like generate a XML model from these files as I use to do with the standard xsd files. Unfortunately, it doesn't work with the driver I use usually.
    Do you know if you can generate an xml model from xsd files which contain UBL and if yes, could you say me all the steps I must do to that successfully please?
    Thank you in advance.
    Olivier

    Hello All,
    What I mean is :
    when an xsd file calls an other xsd files by using the namespaces (when 2 xsd files are linked), is there a way to create an xml model matching with the contain of these 2 xsd files?
    Can someone say me if the only solution to generate a xml model is to have only one xsd file?
    Thank you in advance

  • Oracle Sqldeveloper and *.xsd Files

    Hi,
    I've been playing with writing some simple sqldeveloper xml extensions.
    I ran across this link:
    http://wiki.oracle.com/page/SQL+Dev+SDK+How+To+create+an+XML+User+Defined+Extension
    Extension Framework
    SQL Developer database navigator, database object editors, database object actions and reports can be extended easily using XML.
    TODO : Expose the xsd files
    The XML for each type of extension (NAVIGATOR, EDITOR,ACTION,REPORT) can be found here in xsd format.
    Use these as a reference after completing the examples below.
    * navigator.xsd
    * editor.xsd
    * action.xsd
    * report.xsd
    I had a look around in sql developer, but couldn't see these files. Are they available somewhere?
    Thanks.

    So, in the meantime, the best way to get started is to copy the examples, like the ones in the wiki entry and adapt them to do what you want to do. The places to add your own SQL and your own names are pretty easy to figure out with a little study. There are a few more examples in the Oracle Wiki, and some on the SQL Developer pages on OTN. Many thanks to Sue Harper and Dermot O’Neill. Find their articles at:
    http://www.oracle.com/technology/oramag/oracle/07-jul/o47sql.html
    http://www.oracle.com/technology/oramag/oracle/07-may/o37sql.html
    http://www.oracle.com/technology/obe/hol08/sqldev_srccodexmlext/xmlext_otn.htm
    http://wiki.oracle.com/page/SQL+Dev+SDK+Getting+Started
    Also, if you want to create an EDITOR style extension, start by creating a User Defined Report and export it as an XML file. There are only a few differences between the two formats, mostly an extra attribute to tell SQL Developer where to hook the editor to the navigator.
    Finally - I wrote my own paper on extending SQL Developer: http://www.smdi.com/employee/JohnF/articles/Extending%20SQL%20Developer.zip

  • Included XSD-File - defaulttable

    Hello,
    i have a xsd-file "metaddi.xsd" in which i have informations about the "main"-xsd-file. This metadata-xsd-file is included by other xsd-files:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:include schemaLocation="http://190.5.5.111:10000/home/schema/metaddi.xsd"/>
         <xs:element name="bookstore" type="bookstoreType" xdb:defaultTable="XML_BOOKSTORE">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="bookstoreType" xdb:SQLType="XML_BOOKSTORE_TYPE">
              <xs:sequence>
                   <xs:element name="metadata" type="metadataType"/>
                   <xs:element name="content" type="contentType"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="contentType">
              <xs:sequence maxOccurs="unbounded">
                   <xs:element name="book" type="bookType"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    I have e.g. 10 Main-xsd-files. So i have 10 different tables. When i make a select on elements in the metaddi.xsd so i have to address 10 tables. Is it possible to defina a defaulttable for the metaddi.xsd - so that i only have to address 1 table in a select-statement? I hope you understand my problem?
    Thank you
    Heidi

    Hello Marco,
    a view could be a solution. Defining a defaulttable is consequently not possible, isn´t it?
    But how can i create a view based on several tables?
    My metadata.xsd looks like:
    <metadata>
    <category1>country</category1>
    <category2>state</category2>
    <category3>city</category3>
    </metadata>
    The examples in the XDB Developer´s Guide are only with one table. Can you or someone else can give me please a little example how to do this?
    I want a table with 3 columns:
    category1 category2 category3
    And the records of the different tables should be among each other. How can i do this?
    Thank you very much
    Heidi

  • Convert XML data to byte array...

    Hello All,
    In my application, i have an XML file and the corresponding XSD file. This XML file is having some date, which i want to convert into an byte[] and then save it in a file. 
    How i can convert the XML data in the byte[]? Here as an example of the xml file and the byte[] data which i want to save in a file.
    <?xml version="1.0" encoding="utf-8"?>
    <HeadersInfo>
    <header>
    <id>0</id>
    <Name>H1</Name>
    </header>
    <header>
    <id>1</id>
    <Name>H2</Name>
    </header>
    </HeasersInfo>
    In the above example 'id' field is of type 'uint' and 'name' field is of type 'string' with max length of '5'. So in this case my byte array should be as shown below:
    00 00 00 01 48 31 00 00 00
    00 00 00 02 48 32 00 00 00
    Here underlines values are for the 'id' parameter where as values in bold are for 'Name' parameter for all the header values in sequence. Name parameter is null (0x00) padded.
    Thanks in advance,
    IamHuM

    Hi,
    the following example extract the id, name values using LINQ To Xml and writes it to a memory stream using a binary writer and returns the result as a byte array:
    internal static byte[] GetXmlAsByteArray()
    var document = XDocument.Parse("<HeadersInfo>"
    + " <header><id>1</id><Name>H1</Name></header>"
    + " <header><id>2</id><Name>H2</Name></header>"
    // additional testing
    + " <header><id>32767</id><Name>H1234</Name></header>"
    + " <header><id>305419896</id><Name>H56789</Name></header>"
    + "</HeadersInfo>");
    const int NameLength = 5; // Max length for a name
    byte[] zeroBytes = new byte[NameLength]; // Helper to fill name
    using (var ms = new MemoryStream())
    using (var writer = new BinaryWriter(ms))
    // write each header
    foreach (var header in document.Root.Elements("header"))
    int id = (int)header.Element("id");
    string name = (string)header.Element("Name");
    byte[] nameBytes = System.Text.Encoding.UTF8.GetBytes(name);
    Console.WriteLine("id: {0}, Name: {1}", id, name);
    // Write id
    writer.Write(GetUIntBytes((uint)id));
    // Write name NameLength (5) max, otherwise padded
    if (nameBytes.Length > NameLength)
    writer.Write(nameBytes, 0, NameLength);
    else
    writer.Write(nameBytes, 0, nameBytes.Length);
    if (nameBytes.Length < NameLength)
    writer.Write(zeroBytes, 0, NameLength - nameBytes.Length);
    byte[] result = ms.ToArray();
    // dump array
    foreach (var value in result)
    Console.Write("{0:X2} ", value);
    Console.WriteLine();
    return result;
    public static byte[] GetUIntBytes(uint value)
    if (BitConverter.IsLittleEndian)
    // swap bytes
    value = ((value & 0x00ff) << 24)
    | ((value & 0xff00) << 8)
    | ((value & 0x00ff0000) >> 8)
    | ((value & 0xff000000) >> 24);
    return BitConverter.GetBytes(value);
    For a general purpose solution you should create a class and split the example into separate methods to extract the data and write the values (integers, strings).
    Regards, Elmar

  • How to convert XMl file to XSD file

    how to convert XMl file to XSD file ?
    i have a xml file format  it has to be converted to xsd file through ABAP .
    Regards
    Anbu B

    i got the answer....
    Regards
    Anbu B

Maybe you are looking for

  • File Upload and download without asking/specifing the path

    Hi, I have a requirement in which user must be able to edit the Abode offline form by clicking on edit link. On clicking the link document must open (either download to some temporary location) in new window and user must be able to edit & to save th

  • Exporting Users by display name with Apostrophe

    Looking to read in a list of users by display name, grab additional properties, format and export to a new list. This issue I have is users with apostrophe's in their display name do not get parsed properly.  I'm not sure how to leverage the ` in thi

  • Regex help, only dependent on first letter

    hi, i have a problem using the regex utility, i have an array containing random words. i need to filter out and print out the words that starts with a, h or m. this is part of my coding it seems to me that the comparison will print any word with a, h

  • VC Web Service "Invalid url error", after following all steps in blog.

    I need urgent help. I am trying to define External Web Service System http://www.webservicex.net/CurrencyConvertor.asmx?WSDL I have completed all steps as given in https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/webServiceInvalid+URL& But it st

  • Flv/fla playback issue.

         I am a flash rookie, but id like to think that I am learning fast.  I built a flash player that has many external flv videos.  The player functions perfectly when played in flash with the test movie function.  It also plays fine in deamweaver wh