Validate XML using XSD (XML Schema)
Hi experts.
Is there any way in ABAP to validate XML file against specified XSD file?
I found only possibility to validate against DTD, but no XSD. As far as I know this is only possible in Java, or is a part of XI. Is it doable without Java or XI (on NetWeaver 2004s)?
Help appreciated (and rewarded).
Regards, Frantisek.
Hello
Perhaps you missed this link: [How to Perform XML Validations in SAP NetWeaver Process Integration 7.1|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1]
Regards
Uwe
Similar Messages
-
Hi All
please tell me how to validate xml using xsd
regardsTry using this link:
= http://www.google.nl/search?q=XML+validate+oracle for instance or
= use the search button on this forum and / or
= read the FAQ on this (XML DB FAQ
Thanks Eddie et all, for educating me via http://awads.net/wp/2006/11/14/barts-punishment-for-asking-dumb-questions (don't mind the URL , the info there is really useful)
The following link on this site is just brilliant: http://www.albinoblacksheep.com/flash/posting.php
Grz
Marco
Message was edited by:
mgralike -
Hi, I want to make an XML using 2 XML outputs, it is about taking few section of each XML and making new XML.
Can we do it using oracle 8.1.7 version and XSLT with PL/SQL.jus include the line in your xml file.
<DOCTYPE <doctype_name> SYSTEM "dtd_file_name">
It will work.
if u open xml file in explore thne it will not work. so use some other tool to validate u r xml file against u r dtd or schema like XML SPY.
.....yogesh -
Overriding web.xml using Plan.xml
Hi,
I want to override certain values (MAX_ROW_FETCH_SIZE) in web.xml using Plan.xml for a servlet deployed on weblogic server.
My web.xml looks like this.
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>trial</servlet-name>
<servlet-class>oracle.apps.cmi.sv.fwk.webui.trial</servlet-class>
<init-param>
<param-name>MAX_ROW_FETCH_SIZE</param-name>
<param-value>50</param-value>
</init-param>
<init-param>
<param-name>JDBC_MAX_FETCH_SIZE</param-name>
<param-value>20</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>trial</servlet-name>
<url-pattern>/trial</url-pattern>
</servlet-mapping>
</web-app>
My Plan.xml looks like this
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>SPUF</application-name>
<variable-definition>
<variable>
<name>SessionDescriptor_timeoutSecs_13708393894780</name>
<value>3602</value>
</variable>
<variable>
<name>MAX_ROW_FETCH_SIZE</name>
<value>3</value>
</variable>
<variable>
<name>JDBC_MAX_FETCH_SIZE</name>
<value>2</value>
</variable>
</variable-definition>
<module-override>
<module-name>SPUF.war</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<variable-assignment>
<name>SessionDescriptor_timeoutSecs_13708393894780</name>
<xpath>/weblogic-web-app/session-descriptor/timeout-secs</xpath>
</variable-assignment>
</module-descriptor>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
<variable-assignment>
<name>MAX_ROW_FETCH_SIZE</name>
<xpath>/web-app/servlet/init-param/[param-name="MAX_ROW_FETCH_SIZE"]/param-value</xpath>
<operation>replace</operation>
</variable-assignment>
<variable-assignment>
<name>JDBC_MAX_FETCH_SIZE</name>
<xpath>/web-app/servlet/init-param/[param-name="JDBC_MAX_FETCH_SIZE"]/param-value</xpath>
<operation>replace</operation>
</variable-assignment>
</module-descriptor>
<module-descriptor external="true">
<root-element>wldf-resource</root-element>
<uri>META-INF/weblogic-diagnostics.xml</uri>
</module-descriptor>
</module-override>
<config-root>/home/oracle/ebssdk2</config-root>
</deployment-plan>
I can see new value reflected for "Session TimeOut" for service configuration.
However when I use service to query certain data while considering "MAX_ROW_FETCH_SIZE" parameter, It is still querying 50 rows (Value in web.xml) at a time instead of 3 (As defined in Plan.xml)
I am using servlet init method to get init parameters in my java file.
Can someone help me to overcome from this issue or have any suggestion?You could use Apache Ant and create 2 separate WAR files , one for development and one for production.
Normally I don't create a WAR file for the development environment. WAR file is made only for production.
This is how my Ant task runs currently.
1) For the development environment the ant task runs only to compile Java classes and nothing else, web.xml is that for development environment.
2) When the app is ready for production , I run Ant to copy all files from my dev folder to a temporary build folder - during this copy I filter out the .java files (since there's no longer a need for them in production) only class files are moved.
3) Then I treat the above temporary folder as the source folder, and run the Jasper pre-compiler which significantly alters the web.xml file .
But the good part is that my original development web.xml stays unaltered since it is in it's own folder.
4) Then finally I run a WAR task on the processed contents of the temporary build folder which contains the modified web.xml
This way each environment has it's own web.xml . -
Hi All,
I am getting error while loading XML in <fx:XML> tag.
Error:
TypeError: Error #1090: XML parser failure: element is malformed.
MXML Code:
<fx:Declarations>
<fx:XML id="xmlSource2" source="sample.xml"/>
</fx:Declarations>
Sample XML Used: (sample.xml)
<?xml version="1.0" encoding="UTF-8"?>
<File>
<Chemical id="000035676" displayFormula="C39-H45-N2-O6"
displayName="Dimethyltubocurarine">
<NameList>
<NameOfSubstance>
Dimethyltubocurarine
<SourceList>
<Source>MESH</Source>
</SourceList>
</NameOfSubstance>
<SystematicName>
Tubocuraranium, 6,6',7',12'-tetramethoxy-2,2',2'-trimethyl-
<SourceList>
<Source>NLM</Source>
</SourceList>
</SystematicName>
<Synonyms>
Dimethyltubocurarine
<SourceList>
<Source>NLM</Source>
</SourceList>
</Synonyms>
<Synonyms>
Dimethyltubocurarinium
<SourceList>
<Source>NLM</Source>
</SourceList>
</Synonyms>
<Synonyms>
Methyltubocurarinum
<SourceList>
<Source>NLM</Source>
</SourceList>
</Synonyms>
</NameList>
<NumberList>
<CASRegistryNumber>
35-67-6
<SourceList></SourceList>
</CASRegistryNumber>
<RelatedRegistryNumber>
518-26-3 (iodide.hydriodide)
<SourceList>
<Source>MESH</Source>
</SourceList>
</RelatedRegistryNumber>
</NumberList>
<ClassificationList>
<ClassificationCode>
Neuromuscular nondepolarizing agents
<SourceList>
<Source>MESH</Source>
</SourceList>
</ClassificationCode>
</ClassificationList>
<FormulaList>
<MolecularFormula>
C39-H45-N2-O6
<SourceList>
<Source>NLM</Source>
</SourceList>
</MolecularFormula>
</FormulaList>
<FormulaFragmentList></FormulaFragmentList>
<NoteList></NoteList>
<LocatorList>
<FileLocator
url="http://cnetdb.nci.nih.gov/cgi-bin/srchcgi.exe?DBID=****3&SFMT=****_basic%2F10%2F0%2F0&TYPE=search&SRCHFORM=passthru%3D%Asrchform%3ASRCH%3A&FIELD_001=[CAS]35-67-6&GoButton=Search&FIELD_001_CTL=EXPR&FIELD_908=&FIELD908_CTL=HASABSTRACT&FIELD_903=&FIELD_903_CTL=YEARFORE&DOCPAGE=10">CANCERLIT</FileLocator>
<FileLocator
url="http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+toxline:@and+@term+@rn+35-67-6+@term+@org+DART">DART/ETIC</FileLocator>
<FileLocator
url="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&db=PubMed&term=35-67-6[ECNO]+OR+"~"[MH]">MEDLINE</FileLocator>
<FileLocator
url="http://www.nlm.nih.gov/cgi/mesh/2K/MB_cgi?term=35-67-6&rn=1">MESH</FileLocator>
<FileLocator
url="http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+toxline:@term+@rn+35-67-6+@OR+@mh+""">TOXLINE</FileLocator>
</LocatorList>
</Chemical>
</File>
Also, when I am using HttpService to load same XML I am getting no such error!!
<s:HTTPService id="employeeService"
url="sample.xml"
result="employeeService_resultHandler(event)"
fault="employeeService_faultHandler(event)"/>
Please help!!
Thanks.
AbhinavI think url in XML is creating problem here.
<FileLocator
url="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&db=PubMed&term=23-95-0[ECNO]+OR+"~"[MH]">MEDLINE</FileLocator>
Is there any way to parse this XML using <fx:XML/> ??
Thanks. -
Hi,
I know we can use XML as data server with DTD. Is it also possible to use XSD instead of DTD. If yes would the driver be same.
Thanks
Jasvinder SinghGot SAS error when used as "jdbc:snps:xml?f=C:\myxml.xml"
(Try to insert null into a non-nullable column: column: NAME table: STAGI_ELEMENT in statement [insert into STAGI_ELEMENT (ELEMENTORDER, ELEMENTPK, NAME, REF, SCHEMAFK, SEQUENCEFK) values (?, ?, ?, ?, ?, ?)]
all these table name and columns comes by itselt , non are reffereing to my data. thn i tried some jugglery in changing the XSD. then it worked , but when i reserved though model window it showed me as
SCHEMA Table
ELEMENT Table
SEQUENCE Table
COMPLEXTYPE Table
these are part of XSD elements definations.
what i understand that use f=xml file and d=dtd file name or d=xsd file name. -
I Have to generate XML file using XSD. I have the xsd available with me ,i have the values of elements also,now i need create a xml file using the XSD or DTD, with the values i got from the database.
Kindly help.Create an XML file from XSD file
-
Generate xml using FOR XML PATH from table with hierarchy
I need to create xml from a table like:
EL1 EL2 EL3 Attr01 Attr02 Attr03 Attr04
E10, , ,a,b,c,d
E10,E1010, ,a,b,c,d
E10,E1010,E101010,a,b,c,d
E10,E1010,E101020,a,b,c,d
E10,E1010,E101030,a,b,c,d
E10,E1020, ,a,b,c,d
E10,E1020,E102010,a,b,c,d
E20, , ,a,b,c,d
E20,E2010, ,a,b,c,d
E20,E2010,E201010,a,b,c,d
E20,E2020, ,a,b,c,d
E20,E2020,E202010,a,b,c,d
E20,E2020,E202020,a,b,c,d
The hierarchy is EL1--EL2--EL3, and the 3 columns should be elements of xml;
The other for columns Attr01,Attr02,Attr03,Attr04 should be attributes of xml;
The actual table could have more than 500 rows(there are many values for El1,EL2,and EL3).
The expected xml should like:
<root>
<E10 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
<E1010 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
<E101010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
<E101020 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
<E101030 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
</E1010>
<E1020 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
<E102010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
</E1020>
</E10>
<E20 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
<E2010 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
<E201010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
</E2010>
<E2020 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
<E202010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
<E202020 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
</E2020>
</E20>
</root>
I create a sample Src table:
CREATE TABLE Src
EL1 VARCHAR(10),
EL2 VARCHAR(10),
EL3 VARCHAR(10),
Attr01 VARCHAR(10),
Attr02 VARCHAR(10),
Attr03 VARCHAR(10),
Attr04 VARCHAR(10)
GO
INSERT INTO Src
(EL1,EL2,EL3,Attr01,Attr02,Attr03,Attr04
SELECT 'E10','','','a','b','c','d'
UNION SELECT 'E10','E1010','','a','b','c','d'
UNION SELECT 'E10','E1010','E101010','a','b','c','d'
UNION SELECT 'E10','E1010','E101020','a','b','c','d'
UNION SELECT 'E10','E1010','E101030','a','b','c','d'
UNION SELECT 'E10','E1020','','a','b','c','d'
UNION SELECT 'E10','E1020','E102010','a','b','c','d'
UNION SELECT 'E20','','','a','b','c','d'
UNION SELECT 'E20','E2010','','a','b','c','d'
UNION SELECT 'E20','E2010','E201010','a','b','c','d'
UNION SELECT 'E20','E2020','','a','b','c','d'
UNION SELECT 'E20','E2020','E202010','a','b','c','d'
UNION SELECT 'E20','E2020','E202020','a','b','c','d'
GO
I tried to use FOR XML PATH to generate xml for the sample data. When the records increase to a few hundreds, it's not a good idea.
Here is my script:
SELECT
(SELECT Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E101010'
FOR XML PATH('E101010'),TYPE
) AS 'node()'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E101020'
FOR XML PATH('E101020'),TYPE
) AS 'node()'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E101030'
FOR XML PATH('E101030'),TYPE
) AS 'node()'
FROM Src
WHERE EL2 = 'E1010' AND (EL1 <>'' AND EL3 ='')
FOR XML PATH('E1010'),TYPE
) AS 'node()'--1010
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E102010'
FOR XML PATH('E102010'),TYPE
) AS 'node()'
FROM Src
WHERE EL2 = 'E1020' AND (EL1 <>'' AND EL3 ='')
FOR XML PATH('E1020'),TYPE
) AS 'node()'--1020
FROM Src
WHERE EL1 = 'E10' AND (EL2 ='' AND EL3 ='')
FOR XML PATH('E10'),TYPE) 'node()'
,(SELECT Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E201010'
FOR XML PATH('E201010'),TYPE
) AS 'node()'
FROM Src
WHERE EL2 = 'E2010' AND (EL1 <>'' AND EL3 ='')
FOR XML PATH('E2010'),TYPE
) AS 'node()'--2010
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E202010'
FOR XML PATH('E202010'),TYPE
) AS 'node()'
,( SELECT
Attr01 AS '@Attr01'
,Attr02 AS '@Attr02'
,Attr03 AS '@Attr03'
,Attr04 AS '@Attr04'
FROM Src
WHERE EL3 = 'E202020'
FOR XML PATH('E202020'),TYPE
) AS 'node()'
FROM Src
WHERE EL2 = 'E2020' AND (EL1 <>'' AND EL3 ='')
FOR XML PATH('E2020'),TYPE
FROM Src
WHERE EL1 = 'E20' AND (EL2 ='' AND EL3 ='')
FOR XML PATH('E20'),TYPE) AS 'node()'
FOR XML PATH(''),ROOT('root')
If I get a few hundreds of rows, how huge the script should be. Does anyone have better solution for this? Thanks.
TaowBob,
Thanks! And sorry for late feedback.
The XSD requires the xml structures like the following
<Schools>
<School01>Some school</School01>
<School02>Some other school</School02>
</Schools>
I have to use the number in the element name.
Right now I just use the nested FOR XML PATH, although I have to write thousand lines code.
Thanks anyway.
Tao
Tao -
Can i use XSD / XML in Abap Programs
Hi friends
I need to validate a xml file against xsd file. Can i validate it in abap program?
Best Regards.
PHi Pedro,
Simple transformations, or ST, is a proprietary SAP programming language that describes the transformation of ABAP data to XML (serialization) and from XML to ABAP data (deserialization).
Check this out...
Simple Transformations - SAP Library
Regards,
Raj
<dead link corrected>
Message was edited by: Manish Kumar -
Hi folks,
I am not sure whether this thread has been answered, but I am looking for ways to create an XML object from a CSV input stream/file where the format may change in the future. I would like to use an XSD to do the mapping. Is it possible? If so what is required? If not possible, what is the next best thing.
Thanks in advance.
-rXSLT is a thingie that transforms XML. It can transform XML into something that is not XML, but it cannot transform something that is not XML into anything.
The only XML-ish thing I've seen done with non-XML contents was described by Michael Kay in his XML book, published by Wrox. It is possible to read a well-formed (meaning that you have some prior knowledge of the format, and how it would look if it were only XML) file, and call a SAX ContentHandler as if you were a parser. You call the startDocument method, then you figure out what element comes next, and call the startElement, the characters, and endElement methods for that content. As far as the ContentHandler is concerned, it thinks it is getting good SAX content, and it is. The difference is that it is not coming from a SAX parser.
The example given in the referenced book is reading a GEDCOM file. That is a structured text version of genealogical data. It has records for families, marriages, children, etc. It is no at all an XML source.
I hope this helps.
Dave Patterson -
Database to XML with XSD (XML schema)
I have an Oracle 9 DB.
I need to convert data from a table (Java ResultSet) to XML (I have an XML schema file).
How can I do?
Is there a tool?
Thanks, Ludo.Refer to
Oracle Xml Sql Utility.
http://www.xml.com/pub/r/846 -
Query resultset to xml using java and XML schema
Hi,
I query data using JDBC and I want to store it to an XML file which has a well defined XML schema. I searched a lot in the forum but did not find an answer. Please guide me to create this program.
I have managed to use JDBC to get result set but I do not know how to export is to XML using XSD and Java.
Please help.
Regards,
RaviI have managed to use JDBC to get result set but I do
not know how to export is to XML using XSD and Java.Export using XSD? Schemas are for validation.
Iterate through the result set, and build up the XML stream by creating an entry for each row.
Another way to do it is to load the ResultSet into a Java object and serialize that to XML using something like XStream.
% -
Execute C# in PowerShell: errors with " using System.XML "
Hi , I'm trying to execute C# code in Power Shell 2.0 .
My problem is for the references at the beginning of the code:
$code = @"
using System;
using System.Collections;
using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
public class Program
static void Main()
{ /* the code wich works*/
Add-Type -TypeDefinition $code -Language "CSharpVersion3"
Powershell give me an error saying that " The type or namespace Linq doesn't exist" , and the same for Xml. I have Visual studio express 2013 .
How can add or import correctly those references? or what is my error?Hi Rebegg,
As this issue is related to Visual Studio, I suggest you create a new thread on Visual Studio forum, more experts will assist you with this issue.
Visual Studio forum:
http://social.msdn.microsoft.com/Forums/en-US/home?category=visualstudio
In addition, about this issue, you have to add your assemblies to your PowerShellsession before you can reference them to you C# Code, you can use the script like:
$Assem = (
...add referenced assemblies here...
$Source = @"
...add C# source code here...
Add-Type -ReferencedAssemblies $Assem -TypeDefinition $Source -Language CSharp
Here are some similar posts for your reference:
http://ruudvanderlinden.com/2010/10/19/running-inline-c-with-custom-assemblies-in-powershell-2-0/
http://powershell.com/cs/media/p/133.aspx
http://blogs.technet.com/b/stefan_gossner/archive/2010/05/07/using-csharp-c-code-in-powershell-scripts.aspx
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
How can we validate a XML against his external schema XSD
Hi;
I use the XML library for create my XML file, Im extracting the data
from R3 and building the XML document.
I wish to validate this document against his schema XSD built by third party (government organization) before i transfer this data (xml file)
to the external entity.
In my abap program:
¿How can i reach this validation level and if any
error exists then how can i get or trap the detail information?
this is a sample file XML with the external schema reference, as you can see in this part of the code.
<?xml version="1.0" encoding="UTF-8" ?>
- <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/cfd/2 http://www.sat.gob.mx/sitio_internet/cfd/2/cfdv2.xsd" version="2.0" serie="A" folio="0000238" fecha="2006-09-01T19:32:03-05:00" sello="o4kAzhytaTKThSk9tbTQGg5OGacAltWZwxQPZuMg1XhfjMq5jJ0GyO7w2//bf8aTuHnbqwpkR7rIgIehGLy88Xb3Ck0EDsWZEAC1QUuqRq2iWKAnGQPS4l9s0QrJHt0Ziojjd0GQFek6BYXPdlmdTjLZ2x+J8ffYEGpIQZRB8=" noAprobacion="2755" anoAprobacion="2006" formaDePago="En una sola exhibicion" noCertificado="00001000000000806462" condicionesDePago="Neto a 30 días sin DPPP" subTotal="2531.99" descuento="0.00" total="2912.90" tipoDeComprobante="ingreso">
<DomicilioFiscal calle="AVE. UNIVERSIDAD" noExterior="992 NTE." colonia="COL. CUAUHTEMOC" municipio="SAN NICOLAS DE LOS GARZA" estado="N.L." pais="MEXICO
We are using SAP R/3 46C
Thanks in Advance for your help.
Alejandro PérezHi, Alejandro
Did you found something on SAP side in order to generated this XML.
Currently I´m trying to find out some on SAP but nothing at this moment.
The company that I´m working needs to implement "Factura Electonica" also.
Probably we will use external broker to do this for us, and we will send just Idoc to the broker.
Please, let me know your progress on SAP side.
Regards, Fabio -
Validate XML against XSD using PLSQL
Hi,
We now need some kind of automated solution that will pick
up the XMLs from a specific location or table and validate them
against the XSD in only Oracle PLSQL.
The validation of the XML against the XSD should take place when the XML is parsed.
I want to know how first the XSD's are stored or registered in the Oracle XDB repository.
Please can anyone suggest me how this can be done with a simple example
with a sample XML and XSD?
Regards,
Marlon.Hi, I'm not an expert but I've been reading a lot and I found this and it works. I'll hope it is useful.(Oracle 10)
declare
-- Local variables here
res BOOLEAN;
tempXML XMLType;
xmlDoc XMLType;
xmlSchema XMLType;
schemaURL varchar2(256) := 'testcase.xsd';
schemaPath varchar2(256) := '/public/testcase.xsd';
begin
dbms_xmlSchema.deleteSchema(schemaURL,4);
-- Test statements here
xmlSchema := xmlType(
'<?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:element name="root" xdb:defaultTable="ROOT_TABLE">
<xs:complexType>
<xs:sequence>
<xs:element name="child1"/>
<xs:element name="child2"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
dbms_xmlschema.registerSchema(schemaURL,
xmlSchema , --xdbURIType(schemaPath).getClob(),
TRUE,TRUE,FALSE,TRUE
xmlDoc:=xmltype('<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="' || schemaURL || '"><child1>foo</child1><child2>bar</child2></root>');
dbms_output.put_line(xmlDoc.getStringVal());
xmlDoc.schemaValidate();
END;
Maybe you are looking for
-
Cannot download Creative Cloud due to Adobe Bridge error
My Windows based computer will not allow me to download any of the CS6 products available through the Creative Cloud subscription. The error I continue to receive is that Adobe Bridge is open. I've since used the Adobe Cleanup Tool to delete my previ
-
Please, can anybody help? I am using a Windows phone. It is a samsung Focus S Smartphone operating windows 7.5....My computer is running Windows XP. I can use Zune just fine but Itunes does not recognize my phone whatsoever! I cant get help from Appl
-
BADI/ User Exit for transaction FTR_EDIT/FTR_CREATE initial screen
Hi All, I want a BADI/User Exit for FTR_EDIT/FTR_CREATE transactions to validate company code and partner fields. please provide your suggestions.
-
Is there any way to make the page size of a PDF document smaller? I'm at 30"x36" and want 8.5"x11"
-
How to Include a servlet in a jsp
Hello, My jsp pages are all tied to respective Servlets. So when I have to forward to a jsp, I forward to a servelt which redirects to that jsp. Now I have a jsp page which has to include another jsp page. So I am trying to include a servlet in my js