Reading xsd files

Hi all,
I want to read xsd file(3 xsd file with namespaces).
Each xsd file contains namespace uri.
I want to read these xsd files and i want to get all the child node and attributes of given parent node.
how to get the information about each and every element's attributs and its child etc.
Message was edited by:
b_prasad
Message was edited by:
b_prasad

You could use Stylus Studio for the same

Similar Messages

  • How to read XSD file

    Hi all,
    I want to read XML Schema (XSD) files in my application. But dont know any API for this.
    For ex:
    <xs:schema xmlns:sswfm="http://www.sumasoft.com/XMLSchema/WFM" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sumasoft.com/XMLSchema/WFM" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="Bounds" type="sswfm:BoundsType"/>
         <xs:complexType name="BoundsType">
              <xs:sequence>
                   <xs:element name="PositionX" type="xs:integer" default="0"/>
                   <xs:element name="PositionY" type="xs:integer" default="0"/>
                   <xs:element name="Width" type="xs:integer" default="20"/>
                   <xs:element name="Height" type="xs:integer" default="10"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>in this XSD i need to read all the elements like this-
    PositionX - 0
    PositionY - 0
    Width - 20
    Height - 10
    My XSD is much more complex than this. It may contains Enumerations, minlength, maxLength.
    How can i read like this?
    Any help is appreciable.

    I have the same problem ...
    I'm not able to read an .xsd file and load SimpleType and ComplexType .
    Can you help me ?
    Thank you very much .
    Marco

  • SAXParser unable to read xsd file to verify xml files :(

    I have an xsd file which the SAXParser is to parse and use it to validate some xml files.
    I used the setEntityResolver and parse methods of the SAXParser and a custom class called MyEntityResolver. But errors appeared when the code is run.
    The class where the SAXParser and the custom class is used is shown below:
    import org.apache.xerces.parsers.DOMParser;
    import java.io.*;
    import org.w3c.dom.Document;
    import org.apache.xerces.parsers.SAXParser;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.SAXRecognizedException;
    public class SchemaTest{
        public boolean validateSchema(String xmlFilePath, String xsdFilePath)
             try{
                SAXParser parser = new SAXParser();
               parser.setEntityResolver(new MyEntityResolver(xsdFilePath));
               parser.parse(xmlFilePath);
             catch(SAXParseException e)
    }The custom class MyEntityResolver is listed below:
    import org.xml.sax.EntityResolver;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class MyEntityResolver implements EntityResolver{
       private static String dtd = null;
       public MyEntityResolver(String dtd){
              this.dtd = dtd;
       public InputSource resolveEntity(String arg0,String arg1) throws
       SAXException, IOException {
             return new org.xml.sax.InputSource(dtd);
    }The SAXParseException was caught when the code runs. Is there something wrong with the code above or does the fault lie with the xsd/xml file?

    its XSD or XML file ? if you have imported the XSD into Object Library from Desginer, and you are using that as source or target in your DF then you don't need the XSD file on Unix, DF doesn't read the XSD the schema is already there in repo it is read from repository
    for importing XSD you have to do that from Desginer and that file has to be on windows

  • How to read a file with data in Hierarchical Structure using XSD Schema

    Hi
    We have requirement in which we have to read a FIXED LENGTH file with FILE ADAPTER. File contains the data in hierarchical structure. Hierarchy in the file is identified by the first 3 characters of every line which could be any of these : 000,001,002,003 and 004. Rest files are followed after these. So structure is like:
    000 -- Header of File. Will come only once in file. Length of this line is 43 characters
    -- 001 -- Sub Header. Child for 000. Can repeat in file. Length of this line is 51 characters
    --- 002 -- Detail record. Child for 001. Can repeat multiple times in given 001. Length of this line is 43 characters 1353
    -- 003 -- Sub Footer record at same level of 001. Will always come once with 001 record. Child for 000. Length of this line is 48 characters
    004 -- Footer of file.At same level of 000. Will come only once in file. Length of this line is 48 characters
    Requirement is to create an XSD which should validate this Hierarchical Structure also i.e data should come in this hierarchy only else raise an error while parsing the file.
    Now while configuring the FILE ADAPTER to read this file we are using Native Schema UI to create the XSD to parse this structure using an example data file. But we are not able to create a valid XSD for this file which should validate the Hierarchy also on the file.
    Pls provide any pointers or solution for this.
    Link to download the file, file structure details and XSD that we have created:
    https://docs.google.com/file/d/0B9mCtbxc3m-oUmZuSWRlUTBIcUE/edit?usp=sharing
    Thanks
    Amit Rattan
    Edited by: user11207269 on May 28, 2013 10:16 PM
    Edited by: user11207269 on May 28, 2013 10:31 PM
    Edited by: user11207269 on May 28, 2013 10:33 PM

    Heloo.. Can anyone help me on this. I need to do Hierarchial read / validation while reading the file using File Adapter using Native XSD schema.

  • Getting Page not found while trying to read ws-addressing.xsd file in IE

    Hi All,
    Here I am creating dynamic partner link to call OSB service in my BPEL process. I wan make it dynamic to change run time server address and port numbers. Here I am getting Error (Error occurred reading inline schemas) while creating reference variable as per BPEL cook book. To resolve that exception, I have created /bpel/system/xmllib/ folders in SOA 11g and placed ws-addressing.xsd file. After I am trying to import in BPEL process, still I am getting same Exception.
    Even I tried to read ws-addressing.xsd file through IE browser (http://Host:Port/orabpel/xmllib/ws-addressing.xsd) after placing that directory(/bpel/system/xmllib/). My SOA server and everything is running.
    Thanks in advance.
    mally

    Paul,
    You can try the suggestion in this thread on the XE forum:
    Re: Problem with importing HTML DB applications
    It also shows how to turn on logging in the XE web server.

  • READ XML file + XSD file to create an load data in a table

    Hi gurus,
    What way you will use to create and load data in a SQL TABLE by reading xml+xsd files.
    Can you provide my a running example?
    Is it better to stage the XML structure + XML data in the database before creating/loading the real SQL table. (the size of the XML file could me 1GB)

    See the FAQ..
    For very large files make sure
    1. Use FTP to load...
    2. Ensure schema is registered with storeVarrayAsTable="true" and maintainDOM="false'
    3. Install latest 10.2.0.3.0...
    or
    Look for SaxLoader example in the FAQ
    -M

  • How to read and XSD file in java prospective in NWDS

    Hi !!
    anybody can help me that
    how to read and XSD file in java prospective in Netweaver developer Studio
    Regards
    Abhishek Agrahari

    I guess you can make it more clear...

  • How to read an xml database using xsd file in labview

    I have Labview 8.5. I have an xml file (Database) that contains data from sensors. The data doesnt conform to the LabView's xml schema we have our own schema for the data. is there a way to extract the  digitized waveform data from this xml file by using our own xsd file?
    Regards
    Shoaib

    I am attaching the xsd file here since I am not sure if by attaching the actual 3MB XML file i will be giving away any info that im not supposed to.Please rename the attachement to fmd.xsd
    All i'm looking for is to somehow get the data defined by the following
      <xs:complexType
    name="T_sample">
      <xs:attribute name="num" type="xs:int" use="required"
    />
      <xs:attribute name="value" type="xs:int"
    use="required" />
      <xs:attribute name="value_mv" type="xs:float"
    use="required" />
      </xs:complexType>
    Attachments:
    fmd.txt ‏24 KB

  • Failed to read wsdl file from url

    Hi all,
    I am struggling with WL 9.2, consuming a WSRP enabled portlet at the following point:
    Having created a proxy portlet, refering to the WSDL of the WSRP producer, I did successfully deploy the portal. When accessing the portal and consuming the portlet the following exception is thrown:
    com.bea.wsrp.faults.TransportException: Failed to read wsdl file from url due to -- java.net.ConnectException: Tried all: '8' addresses, but could not connect over HTTP to server: 'www.w3.org', port: '80';
    The WSDL includes a schema (http://www.w3.org/2001/XMLSchema). The URL is definetely accessible by the server.
    I am open for any kind of support ;) Thanks in advance!
    Kind regards,
    Matthias

    Yes, they are all local schemas. The way ALSB works, even if the import path in the wsdl or parent schema doesn't exist, relative to the current directory, you can specify which schema resolves that reference. My WSDL imports several schemas, all of which import others. When I was done importing all the schemas and resolving references, all the references in WSDLs and XSDs were assigned and valid. However, after all of those imports and reference resolution, it still says the WSDL is invalid, with the following odd error message:
    The WSDL is not semantically valid: Failed to read wsdl file from url due to -- java.net.MalformedURLException: no protocol: /XMLSchema/PaymentServices/Resources/PaymentServices-200802.
    That path listed refers to one of the schemas imported by the WSDL. The reference to that schema in the WSDL was resolved, and it doesn't complain about that reference.

  • How to create java classes when multiple xsd files with same root element

    Hi,
    I got below error
    12/08/09 16:26:38 BST: [ERROR] Error while parsing schema(s).Location []. 'resultClass' is already defined
    12/08/09 16:26:38 BST: [ERROR] Error while parsing schema(s).Location []. (related to above error) the first definition appears here
    12/08/09 16:26:38 BST: Build errors for viafrance; org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.7.1:generate': Mojo execution failed.
    I tried genarate java classes from multiple xsd files, but getting above error, here in .xsd file i have the <xe: element="resultClass"> in all .xsd files.
    So I removed all .xsd files accept one, now genarated java classes correctly. but i want to genarte the java classes with diffrent names with out changing .xsd
    Can you please tell me any one how to resolve this one......
    regards
    prasad.nadendla

    Gregory:
    If you want to upload several Java classes in one script the solution is .sql file, for example:
    set define ?
    create or replace and compile java source named "my.Sleep" as
    package my;
    import java.lang.Thread;
    public class Sleep {
    public static void main(String []args) throws java.lang.InterruptedException {
    if (args != null && args.length>0) {
    int s = Integer.parseInt(args[0]);
    Thread.sleep(s*1000);
    } else
    Thread.sleep(1000);
    create or replace and compile java source named "my.App" as
    package my;
    public class App {
    public static void main(String []args) throws java.lang.InterruptedException {
    System.out.println(args[0]);
    exit
    Then the .sql file can be parsed using the SQLPlus, JDeveloper or SQLDeveloper tools.
    HTH, Marcelo.

  • Error while reading wsdl file

    I created and deployed a BPEL process with a JMS adapter and DB adapter.
    I have tested this and it works fine.
    After a few days, I try to open the project and the BPEL process, and click on the DB
    adapter and it throws an exception on the designer :
    "Error while reading wsdl file ... (wsdl file name) NULL Exception"
    This is hard to debug as the exception does not provide any info, NULL.
    This has happened several times for my project. The next time the JMS adapter hit the
    same exception while opening on designer. This one I notice happened after I imported
    a new schema file (xsd) into the BPEL process.
    Only way around that I have for this currently is to delete and recreate the adapters, which as time
    consuming as I have to re-create and re-assign a lot of the activities.
    Has anyone encountered this and is there a way to fix this without deleting/recreating the adapters ?
    Thanks.

    I experienced the same issue and found the cause and a workaround;
    "Error while reading wsdl file …. Exception: null"
    http://www.petervannes.nl/files/b7c08911ce3cde3677e2182bbc5f032a-47.php
    Edited by: 944333 on Jul 3, 2012 10:24 PM

  • XML and XSD file to an internal table

    I had read a lot of thread  but i don't understand how to deal with xml/xsd in R3.
    I need someone that have a definite example for this escenary please.
    With OPEN DATASET took from the server XML and XSD file, and put it in two internal tables type string.
    What functions or method have to use, and how to use them, to charge the XML file in an internal table?
    This is an example of XML and XDS:
    XML
    AND CONTINUE
    Best Regards,

    I just tried to interpret your question, it was not obvious what you wanted.
    I guess what you mean is that you have defined (statically) a deep structure, and you want to decode the XML into it. That is called a transformation (transaction STRANS, statement CALL TRANSFORMATION). You have the choice between 2 transformation languages: XSLT and ST. Of course, it depends what release you are running.
    I advise you to play first with the ID transformation, to convert an ABAP deep structured data object into XML, so that you see what XML is generated, this one is called asXML. If you create your own transformation, when you call it, it will first convert automatically the data object to asXML, and the transformation has to do the rest of the job.
    You can do the opposite, i.e. converting from XML to a data object, according to the same principle (intermediate asXML).
    Well, there are lots of things to say, I recommend you to read articles and documentation on XSLT and ST (search on SDN).
    About XSD, it won't help (and I did never see any possibility to use it) to decode the XML, as you must anyway define the target data object statically (and there's no tool to generate the ABAP code of the data object definition from the XSD).
    Note that you may also use iXML libraries to parse the XML.
    Please tell us more.
    BR
    Sandra

  • 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.

  • How to populate/import data in a XSD file generated from a webservice

    HI All,
      I have an XSD file generated from the webserive using the CRM FM E2C_DOWNLOAD_CRT_SCHEMA.
    I created a Adobe form with the Adobe life cycle designer using the XSD file.
    However Data will have to be entered manually in this adobe form and cannot be pre-populated with data, How do we pre-populate data in the Adobe form generated from XSD file of the above CRM FM.

    This is what you need:
    integer     li_fhandle, li_rcode = 1, li_sfound = 0, li_idx = 0, li_eqpos, i
    string ls_filename = 'C:\app.ini'
    string ls_line, as_key[], as_val[]
    string ls_section = '[General]'
    // OPEN INI FILE
    li_fhandle = FileOpen(ls_filename, LineMode!)
    IF IsNull(li_fhandle) OR li_fhandle < 1 THEN
      // DO NOTHING
    ELSE
      DO WHILE li_rcode > 0
      li_rcode = FileRead(li_fhandle, ls_line)
      IF li_rcode > 0 THEN
      IF POS(ls_section, ls_line) > 0 THEN
      li_sfound = 1
      CONTINUE
      END IF
      IF li_sfound = 0 THEN CONTINUE
      IF POS(ls_line, '[') > 0 AND POS(ls_line, ']') > 0 THEN EXIT
      li_eqpos = POS(ls_line, '=')
      li_idx++
      as_key[li_idx] = MID(ls_line, 1, li_eqpos - 1)
      as_val[li_idx] = MID(ls_line, li_eqpos + 1)
      END IF
      LOOP
    END IF
    FOR i = 1 TO li_idx
      messagebox('Key - Value',as_key[i] + ' = ' + as_val[i])
    NEXT
    // CLOSE INI FILE
    IF li_fhandle > 0 THEN
       FileClose(li_fhandle)
    END IF
    Adapt it to your needs... you probably should make it a function.

  • How to read xlsx files using file sender adapter in PI7.11

    Hi All,
    i have scenario where i need to read the xlsx file and convert it into idoc.
    i have gone through the few bolgs
    but not got proper result to read the xlsx file.
    please guide me how can i achieve this scenario using standard way(like standard adapter modules,graphical mapping).
    i saw in some blogs using API....
    but i am not aware of the process of develop custom modules in PI.
    please if there is any step by step process document to develop custom module for adapters.
    thanks in advance.
    mahesh

    HI Hareesh,
    i have gone through that blog.
    i tried it...but i am getting mapping error  no receiver determination fond because there are so  many excel files.
    my data is available on sharedString.xml but also it is in not same order.
    i have no clue how to handle this part form the blog.
    "This way our mapping will receive all data from the sheet in an XML format. The only thing that's left is to create an XSD file from the XML file we received in order to be able to use it in the mapping and as our Service Interface and we can proceed with mapping. As you can see from the sheet.xml files all the data is placed with column name and row number so it's not that difficult to map it to an table type format using the Message Mapping only (no java, abap mapping required)."

Maybe you are looking for

  • Officejet Pro 8600 Plus - won't print wirelessly

    Installed a new 8600 Plus printer.  Installed it onto my network.  My laptop sees the printer and the scanning function will fire off and talk back and forth with my laptop.  When I try to print, though, the printing fails with "Unable to Communicate

  • Configuring "Generic File Loading Overrides" in Weblogic 9.2

    I'm having difficulties utilizing file overrides for applications in weblogic 9.2. To test I created a test war file, packaged in an ear file. All that's in the war are files: index.jsp and a test.properties index.jsp just displays a variable from th

  • Aperture 3 exporting problems

    Seems that every time I try to export a file from Aperture 3, it hangs for a long time before it performs any exports - it is very slow. In Aperture 2, exporting a file that was 900x600 @ 72 dpi was instant, in Aperture 3 the same file takes 15 minut

  • MAC Re-Start Failure

    My late 2008 Mac Book continuously re-starts, never loading past the apple logo and gear screen. I have spent hours looking through the threads and discovered that zapping the PRAM does not work, running the fsck does not work, starting in safe mode

  • Updating N73 Firmware

    Hi I need advise and assistance on the following problem: I tried to update my firmware from my current V 3.0638.0.0.30 30-10-2006 RM 133 Nokia 73 (12) After checking with the Nokia website on firmware availability, it indicated there was a latest fi