Home » Developer & Programmer » JDeveloper, Java & XML » problem with reading XML attributes and elements (split)
problem with reading XML attributes and elements (split) [message #324874] Wed, 04 June 2008 07:08 Go to next message
zuntoo
Messages: 11
Registered: March 2007
Junior Member
Kindly help extracting the 'Value' on (1), Position=2, as i get the below error, for the given XML.

select
extractvalue(xmltype(xmldata),'/ListOfHierarchyParams/HierarchyParams/
ListOfOrderItemXa/OrderItemXa[position()=2]/Name') from DUAL

ORA-19025: EXTRACTVALUE returns value of only one node.

<ListOfHierarchyParams>
<HierarchyParams>
<ListOfOrderItemXa>
<OrderItemXa>
<ActionCode>-</ActionCode>
<Name>GSM_PRPLAN</Name>
<Value>Economy</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
<OrderItemXa>--------------------(1), (position = 2)
<ActionCode>-</ActionCode>
<Name>GSM_MSISDN</Name>
<Value>12345678901</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
</ListOfOrderItemXa>
</HierarchyParams>
</ListOfHierarchyParams>
<ListOfHierarchyParams>
<HierarchyParams>
<ListOfOrderItemXa>
<OrderItemXa>
<ActionCode>Add</ActionCode>
<Name>CUG_GROUP_ID</Name>
<Value>1-1IUNEIR</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
<OrderItemXa>--------------------(2), (position = 2)
<ActionCode>Add</ActionCode>
<Name>CUG_GROUP_CD</Name>
<Value>Install</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
</ListOfOrderItemXa>
</HierarchyParams>
</ListOfHierarchyParams>

Thanks.
Re: problem with reading XML attributes and elements [message #324879 is a reply to message #324874] Wed, 04 June 2008 07:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
My previous post is also available for you.

Regards
Michel
Re: problem with reading XML attributes and elements [message #324888 is a reply to message #324879] Wed, 04 June 2008 07:48 Go to previous messageGo to next message
zuntoo
Messages: 11
Registered: March 2007
Junior Member
SELECT Extractvalue(Xmltype('<ListOfHierarchyParams>
<HierarchyParams>
<ListOfOrderItemXa>
<OrderItemXa>
<ActionCode>-</ActionCode>
<Name>GSM_PRPLAN</Name>
<Value>Economy</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
<OrderItemXa>--------------------(1), (position = 2)
<ActionCode>-</ActionCode>
<Name>GSM_MSISDN</Name>
<Value>12345678901</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
</ListOfOrderItemXa>
</HierarchyParams>
</ListOfHierarchyParams>
<ListOfHierarchyParams>
<HierarchyParams>
<ListOfOrderItemXa>
<OrderItemXa>
<ActionCode>Add</ActionCode>
<Name>CUG_GROUP_ID</Name>
<Value>1-1IUNEIR</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
<OrderItemXa>--------------------(2), (position = 2)
<ActionCode>Add</ActionCode>
<Name>CUG_GROUP_CD</Name>
<Value>Install</Value>
<ListOfACSOossNumbers/>
</OrderItemXa>
</ListOfOrderItemXa>
</HierarchyParams>
</ListOfHierarchyParams>'),
'/ListOfHierarchyParams/HierarchyParams/
ListOfOrderItemXa/OrderItemXa[position()=2]/Name')
FROM Dual
Re: problem with reading XML attributes and elements [message #324928 is a reply to message #324888] Wed, 04 June 2008 09:07 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Don't hijack other people's threads.
Re: problem with reading XML attributes and elements [message #324945 is a reply to message #324928] Wed, 04 June 2008 10:11 Go to previous messageGo to next message
zuntoo
Messages: 11
Registered: March 2007
Junior Member
it is not the question of hijacking a PLANE FOR 9/11 attacks,
just a reason to ask a question related to the same thread.

[Updated on: Wed, 04 June 2008 10:14]

Report message to a moderator

Re: problem with reading XML attributes and elements [message #324966 is a reply to message #324945] Wed, 04 June 2008 11:44 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
No, it is not related, plus you asked the same question in another new thread, which makes it multiposting on top of hijacking.
Re: problem with reading XML attributes and elements [message #324978 is a reply to message #324966] Wed, 04 June 2008 12:18 Go to previous messageGo to next message
zuntoo
Messages: 11
Registered: March 2007
Junior Member
This is not the same question.
well if u don't want to answer it u can forgive us.
Re: problem with reading XML attributes and elements [message #324989 is a reply to message #324978] Wed, 04 June 2008 12:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Who is "u"?

Regards
Michel
Re: problem with reading XML attributes and elements [message #324991 is a reply to message #324989] Wed, 04 June 2008 13:07 Go to previous messageGo to next message
zuntoo
Messages: 11
Registered: March 2007
Junior Member
STARTING A NEW THREAD GUYS.......
Re: problem with reading XML attributes and elements [message #324996 is a reply to message #324991] Wed, 04 June 2008 13:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why? And why are you shouting?

Regards
Michel
Re: problem with reading XML attributes and elements [message #324997 is a reply to message #324996] Wed, 04 June 2008 14:07 Go to previous message
zuntoo
Messages: 11
Registered: March 2007
Junior Member
I think I am wasting my time in a team of Seniors.
Bye Seniors.
Previous Topic: XMLTYPE Record is not getting update
Next Topic: Problem (ORA-00600 and ORA-30980) with XDB.XMLINDEX and XPath subsetting
Goto Forum:
  


Current Time: Thu Mar 28 05:22:36 CDT 2024