‎2012 Sep 25 4:16 PM
Hey guys,
i am trying to acces a node within my generated xml document via iXML interface. I build up an excel via iXML and it is working fine.
Now i have two problems:
1. i want access to a tag 'PageSetup' which is the child of 'WorksheetOptions'
2. i want to create a new child from 'PageSetup'
How can i achieve this?
thx, Ming
‎2012 Sep 25 4:59 PM
data:
node type ref to IF_IXML_NODE,
root type ref to IF_IXML_NODE,
value type string,
xml_doc type ref to cl_xml_document.
create object xml_doc.
xml_doc->parsestring( STREAM = g_filecontent ).
node = xml_doc->find_node( name = <your name>
root = root ).
value = xml_doc->get_node_attribute( node = node
NAME = <attr_name> ).
Try this code and see if you can access the value. From post http://scn.sap.com/thread/34423
‎2012 Sep 26 8:08 AM
thx for your reply, but it is not working. 😞
I create the xml document by
data: lo_xml type ref to if_ixml,
lo_xml_doc type ref to if_ixml_document.
lo_xml = cl_ixml=>create( ).
lo_xml_doc = lo_xml->create_document( ).
... lo_xml_doc->create_simple_element( .......
... adding some nodes and then i want to access the named node.
Could it be by adding the node 'Worksheet' the node children aren't visible yet? First after rendering the xml object, die children are inserted? It's just an assumption.