Reading XML Document

Answered Question
Nov 16th, 2007

Hi There !

I need help to read a XML document.. the Script returns an error "java.io.FileNotFoundExeption: Priority" in the "Get XML Document Data" Step.

The Priority file contains extensions and names...

1000;President

1001;Manager

1002;Secretary

I already used the step:

list = Create File Document ("Priority.xml"

list = Create XML Document (list)

listNull = Get XML Document Document Data (list,"/descendant::COLAB/child::FUNC/child::LAST")

I'm not sure about how to use this last step...

Can anyone help me ?

Thanks.

Andrei.

Correct Answer by Ruud van Strijp about 9 years 3 months ago

Please try stripping the XML file to:

<?xml version="1.0"?>

Andrei

Andrei

2007-11-14T19:02:12Z

My Comp S.A.

11.8132

And edit the variable to:

varUser = Get XML Document Document Data (varDoc,

"/descendant::DocumentProperties/child::Author")

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
andrei.goncalves Fri, 11/16/2007 - 09:52

==================

Hi !! It was an error in XML file !!!!

Now.. I really need some help to understand how this step works and how it it related to the XML file... I have two examples:

listNull = Get XML Document Document Data (list,"/descendant::Holidays/child::bogusstring")

UserFromList = Get XML Document Document Data (list,"/descendant::Row/child::Cell")

Thanks a lot.

Andrei.

andrei.goncalves Fri, 11/16/2007 - 11:17

Ok, now I think I'm understanding the GET XML step... but I still have NULL as result of this step... This is the GET XML step, and the XML file

-------- GET XML --------

varDoc = Create File Document("Priority.xml")

varDoc = Create XML Document (varDoc)

varUser = Get XML Document Document Data (varDoc,

"/descendant::Workbook/child::DocumentProperties/child::Author")

-------- XML FILE: Priority.xml ----------

<?xml version="1.0"?>

<?mso-application progid="Excel.Sheet"?>

xmlns:o="urn:schemas-microsoft-com:office:office"

xmlns:x="urn:schemas-microsoft-com:office:excel"

xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"

xmlns:html="http://www.w3.org/TR/REC-html40">

Andrei

Andrei

2007-11-14T19:02:12Z

My Comp S.A.

11.8132

It returns NULL in the debug...

Thanks.

Andrei.

Correct Answer
Ruud van Strijp Mon, 11/19/2007 - 02:40

Please try stripping the XML file to:

<?xml version="1.0"?>

Andrei

Andrei

2007-11-14T19:02:12Z

My Comp S.A.

11.8132

And edit the variable to:

varUser = Get XML Document Document Data (varDoc,

"/descendant::DocumentProperties/child::Author")

Actions

This Discussion