ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reading large XML files with FileInput

Post new topic  Reply to topic
 Reading large XML files with FileInput « View previous topic :: View next topic » 
Author Message
fszostak
PostPosted: Thu Feb 24, 2011 7:54 am    Post subject: Reading large XML files with FileInput Reply with quote

Acolyte

Joined: 09 Feb 2011
Posts: 64
Location: Curitiba, Brazil

Hi All!

I need read Parsed Record Sequence of XML file.

For example, the XML structure is:

Code:
<?xml version="1.0"?>
<rootx>
  <group>
     <a>111</a>
     <b>222</b>
     <details>
         <d1>aaa</d1>
         <d2>aaa</d2>
         <d3>aaa</d3>
      </details>
     <details>
         <d1>aaa</d1>
         <d2>aaa</d2>
         <d3>aaa</d3>
      </details>
     <details>
         <d1>aaa</d1>
         <d2>aaa</d2>
         <d3>aaa</d3>
      </details>
  </group>
  <group>
     <a>111</a>
     <b>222</b>
     <details>
         <d1>aaa</d1>
         <d2>aaa</d2>
         <d3>aaa</d3>
      </details>
     <details>
         <d1>aaa</d1>
         <d2>aaa</d2>
         <d3>aaa</d3>
      </details>
     <details>
         <d1>aaa</d1>
         <d2>aaa</d2>
         <d3>aaa</d3>
      </details>
  </group>
</rootx>


I would like read one <group> for each flow execution, because my file size have around 60Mb.

I try set MRM parser and Parsed Record Sequence for record detection, but don't work.

With XMLNSC and "Whole file" for record detection works but load all file content to memory, use around 1Gb to transform the message.

Any good idea?

Thanks
Szostak
_________________
WMB 6.1.005
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 24, 2011 8:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

The principles of dealing with large files are the same as were discussed in your previous post here - which is suspiciously close to a duplicate of this!

fszostak wrote:
I try set MRM parser and Parsed Record Sequence for record detection, but don't work.


Reading XML as if it's TDS never does. Read XML with XMLNSC.

fszostak wrote:
Any good idea?


Follow the advice given in your previous post, or buy more memory.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 24, 2011 8:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

XMLNSC parser is a streaming parser.

If you read the whole file, and do not validate it and do not set parse timing to cause a full parse, you can with some care navigate through the sub-segments of the input message and propagate each out or transform it WITHOUT incurring a full parse of the message requiring enough memory for a full tree.

Look at the large message sample that ships with the product.
Back to top
View user's profile Send private message
fszostak
PostPosted: Thu Feb 24, 2011 9:21 am    Post subject: Reply with quote

Acolyte

Joined: 09 Feb 2011
Posts: 64
Location: Curitiba, Brazil

Vitor wrote:
The principles of dealing with large files are the same as were discussed in your previous post here - which is suspiciously close to a duplicate of this!

fszostak wrote:
I try set MRM parser and Parsed Record Sequence for record detection, but don't work.


Reading XML as if it's TDS never does. Read XML with XMLNSC.

fszostak wrote:
Any good idea?


Follow the advice given in your previous post, or buy more memory.


Hi Vitor!

Its another situation, now i reading XML file and writing sequential cobol file, now response file transformation.

Thanks
Szostak
_________________
WMB 6.1.005
Back to top
View user's profile Send private message
fszostak
PostPosted: Thu Feb 24, 2011 9:35 am    Post subject: Reply with quote

Acolyte

Joined: 09 Feb 2011
Posts: 64
Location: Curitiba, Brazil

mqjeff wrote:
XMLNSC parser is a streaming parser.

If you read the whole file, and do not validate it and do not set parse timing to cause a full parse, you can with some care navigate through the sub-segments of the input message and propagate each out or transform it WITHOUT incurring a full parse of the message requiring enough memory for a full tree.

Look at the large message sample that ships with the product.


Hi mqjeff,

I will try this.

Thanks
Szostak
_________________
WMB 6.1.005
Back to top
View user's profile Send private message
fszostak
PostPosted: Thu Feb 24, 2011 12:35 pm    Post subject: Reply with quote

Acolyte

Joined: 09 Feb 2011
Posts: 64
Location: Curitiba, Brazil

Fixed!

Thanks Mqjeff!

I'm reading file with FileInput with "Whole file" and using sample idea, the memory usage has reducing to 500mb.
_________________
WMB 6.1.005
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 24, 2011 12:39 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fszostak wrote:
Thanks Mqjeff!


You can thank me by fixing
fszostak wrote:
WMB 6.1.005

So that it correctly reads
Code:
7.0.0.2
....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reading large XML files with FileInput
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.