PL/SQL XML to Object Type with Attributes and text()Text editor to open big (giant, huge, large) text filesWhat characters do I need to escape in XML documents?Deserializing empty xml attribute value into nullable int property using XmlSerializerHow do I parse XML in Python?How do I comment out a block of tags in XML?What does <![CDATA[]]> in XML mean?How do you parse and process HTML/XML in PHP?How to serialize/deserialize optional XML enumeration in C#?specify attributes on a nil xml elementXML array with custom attribute and element names

Is it damaging to turn off a small fridge for two days every week?

Is my Rep in Stack-Exchange Form?

Can the negators "jamais, rien, personne, plus, ni, aucun" be used in a single sentence?

Does Marvel have an equivalent of the Green Lantern?

Is there any set of 2-6 notes that doesn't have a chord name?

Is there a maximum distance from a planet that a moon can orbit?

ては's role in this 「追いかけては来ないでしょう」

Why is the voltage measurement of this circuit different when the switch is on?

Impossible darts scores

Should I tell my insurance company I'm making payments on my new car?

Unusual mail headers, evidence of an attempted attack. Have I been pwned?

What do you call a weak person's act of taking on bigger opponents?

Going to get married soon, should I do it on Dec 31 or Jan 1?

Catching generic Exception in a toString implementation - bad practice?

Can ADFS connect to other SSO services?

What kind of wire should I use to pigtail an outlet?

First-year PhD giving a talk among well-established researchers in the field

What sort of mathematical problems are there in AI that people are working on?

How to perform Login Authentication at the client-side?

Did Karl Marx ever use any example that involved cotton and dollars to illustrate the way capital and surplus value were generated?

Low-gravity Bronze Age fortifications

Can’t attend PhD conferences

Require advice on power conservation for backpacking trip

Story-based adventure with functions and relationships



PL/SQL XML to Object Type with Attributes and text()


Text editor to open big (giant, huge, large) text filesWhat characters do I need to escape in XML documents?Deserializing empty xml attribute value into nullable int property using XmlSerializerHow do I parse XML in Python?How do I comment out a block of tags in XML?What does <![CDATA[]]> in XML mean?How do you parse and process HTML/XML in PHP?How to serialize/deserialize optional XML enumeration in C#?specify attributes on a nil xml elementXML array with custom attribute and element names






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I want to deserialize the following XML structure into an PL/SQL Object Type:



<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>


What is special in this XML: The element <Station> has an attribute SerialNumber and the actual text() value Hello.



How do the types must be defined to deserialize the XML into a object types?



For the XML structure I have defined the following types:



CREATE OR REPLACE TYPE station_t FORCE AS OBJECT (
"@SerialNumber" VARCHAR2(100 CHAR)
);


CREATE OR REPLACE TYPE processingInfo_t FORCE AS OBJECT (
"MrwNumber" VARCHAR2(255)
, "Station" station_t
);


This is my execution logic:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;


And the error:



ORA-19031: XML element or attribute text does not match any in type DEMOGRAPHIC.STATION_T
ORA-06512: at "SYS.XMLTYPE", line 196
ORA-06512: at line 11
19031. 00000 - "XML element or attribute %s does not match any in type %s.%s"
*Cause: The passed in XML tag does not match any in the object type
*Action: Pass a valid canonical XML that can map to the given object type


I know that there is something missing in the station_tobject, since the actual text() will be provided but it is not defined in the type. But I do figure it out.



Another question is, how can I access the attribute value when the serialization happend successfully on object level?



Additional: When I remove the text() = Hello from <Station>, the serialization seems to work:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute"></Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;









share|improve this question






















  • Ok to access the attribute SerialNumber working with the following call: DBMS_OUTPUT.PUT_LINE(l_obj."MrwNumber"); DBMS_OUTPUT.PUT_LINE(l_obj."Station"."@SerialNumber");

    – Adam Lukaszewski
    Mar 25 at 10:43


















2















I want to deserialize the following XML structure into an PL/SQL Object Type:



<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>


What is special in this XML: The element <Station> has an attribute SerialNumber and the actual text() value Hello.



How do the types must be defined to deserialize the XML into a object types?



For the XML structure I have defined the following types:



CREATE OR REPLACE TYPE station_t FORCE AS OBJECT (
"@SerialNumber" VARCHAR2(100 CHAR)
);


CREATE OR REPLACE TYPE processingInfo_t FORCE AS OBJECT (
"MrwNumber" VARCHAR2(255)
, "Station" station_t
);


This is my execution logic:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;


And the error:



ORA-19031: XML element or attribute text does not match any in type DEMOGRAPHIC.STATION_T
ORA-06512: at "SYS.XMLTYPE", line 196
ORA-06512: at line 11
19031. 00000 - "XML element or attribute %s does not match any in type %s.%s"
*Cause: The passed in XML tag does not match any in the object type
*Action: Pass a valid canonical XML that can map to the given object type


I know that there is something missing in the station_tobject, since the actual text() will be provided but it is not defined in the type. But I do figure it out.



Another question is, how can I access the attribute value when the serialization happend successfully on object level?



Additional: When I remove the text() = Hello from <Station>, the serialization seems to work:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute"></Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;









share|improve this question






















  • Ok to access the attribute SerialNumber working with the following call: DBMS_OUTPUT.PUT_LINE(l_obj."MrwNumber"); DBMS_OUTPUT.PUT_LINE(l_obj."Station"."@SerialNumber");

    – Adam Lukaszewski
    Mar 25 at 10:43














2












2








2


1






I want to deserialize the following XML structure into an PL/SQL Object Type:



<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>


What is special in this XML: The element <Station> has an attribute SerialNumber and the actual text() value Hello.



How do the types must be defined to deserialize the XML into a object types?



For the XML structure I have defined the following types:



CREATE OR REPLACE TYPE station_t FORCE AS OBJECT (
"@SerialNumber" VARCHAR2(100 CHAR)
);


CREATE OR REPLACE TYPE processingInfo_t FORCE AS OBJECT (
"MrwNumber" VARCHAR2(255)
, "Station" station_t
);


This is my execution logic:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;


And the error:



ORA-19031: XML element or attribute text does not match any in type DEMOGRAPHIC.STATION_T
ORA-06512: at "SYS.XMLTYPE", line 196
ORA-06512: at line 11
19031. 00000 - "XML element or attribute %s does not match any in type %s.%s"
*Cause: The passed in XML tag does not match any in the object type
*Action: Pass a valid canonical XML that can map to the given object type


I know that there is something missing in the station_tobject, since the actual text() will be provided but it is not defined in the type. But I do figure it out.



Another question is, how can I access the attribute value when the serialization happend successfully on object level?



Additional: When I remove the text() = Hello from <Station>, the serialization seems to work:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute"></Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;









share|improve this question














I want to deserialize the following XML structure into an PL/SQL Object Type:



<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>


What is special in this XML: The element <Station> has an attribute SerialNumber and the actual text() value Hello.



How do the types must be defined to deserialize the XML into a object types?



For the XML structure I have defined the following types:



CREATE OR REPLACE TYPE station_t FORCE AS OBJECT (
"@SerialNumber" VARCHAR2(100 CHAR)
);


CREATE OR REPLACE TYPE processingInfo_t FORCE AS OBJECT (
"MrwNumber" VARCHAR2(255)
, "Station" station_t
);


This is my execution logic:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute">Hello</Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;


And the error:



ORA-19031: XML element or attribute text does not match any in type DEMOGRAPHIC.STATION_T
ORA-06512: at "SYS.XMLTYPE", line 196
ORA-06512: at line 11
19031. 00000 - "XML element or attribute %s does not match any in type %s.%s"
*Cause: The passed in XML tag does not match any in the object type
*Action: Pass a valid canonical XML that can map to the given object type


I know that there is something missing in the station_tobject, since the actual text() will be provided but it is not defined in the type. But I do figure it out.



Another question is, how can I access the attribute value when the serialization happend successfully on object level?



Additional: When I remove the text() = Hello from <Station>, the serialization seems to work:



DECLARE
l_obj processingInfo_t;
l_xml XMLTYPE;
BEGIN
l_xml := xmltype(
'<ProcessingInfo>
<MrwNumber>000001</MrwNumber>
<Station SerialNumber="nice-Attribute"></Station>
</ProcessingInfo>');

l_xml.toObject(l_obj);
END;






xml oracle plsql






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 25 at 10:29









Adam LukaszewskiAdam Lukaszewski

111 bronze badge




111 bronze badge












  • Ok to access the attribute SerialNumber working with the following call: DBMS_OUTPUT.PUT_LINE(l_obj."MrwNumber"); DBMS_OUTPUT.PUT_LINE(l_obj."Station"."@SerialNumber");

    – Adam Lukaszewski
    Mar 25 at 10:43


















  • Ok to access the attribute SerialNumber working with the following call: DBMS_OUTPUT.PUT_LINE(l_obj."MrwNumber"); DBMS_OUTPUT.PUT_LINE(l_obj."Station"."@SerialNumber");

    – Adam Lukaszewski
    Mar 25 at 10:43

















Ok to access the attribute SerialNumber working with the following call: DBMS_OUTPUT.PUT_LINE(l_obj."MrwNumber"); DBMS_OUTPUT.PUT_LINE(l_obj."Station"."@SerialNumber");

– Adam Lukaszewski
Mar 25 at 10:43






Ok to access the attribute SerialNumber working with the following call: DBMS_OUTPUT.PUT_LINE(l_obj."MrwNumber"); DBMS_OUTPUT.PUT_LINE(l_obj."Station"."@SerialNumber");

– Adam Lukaszewski
Mar 25 at 10:43













0






active

oldest

votes














Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55335752%2fpl-sql-xml-to-object-type-with-attributes-and-text%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55335752%2fpl-sql-xml-to-object-type-with-attributes-and-text%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현